U E D R , A S I H C RSS

Basic Java2005/5주차

1. static
- static 는 변 .
2. Math Wrapper
- Math .
- abs() : .
- sqrt() : .
- max(), min() : 대/ .
- round() : .
- pow() : .
- PI : 내는
- Wrapper(Integer, Double, Character...)
- parseXXX : String .
- toString : 를 문 .
3. static import
- .....
> 2 .

4. try ~ catch
~java
public class ExceptionExample {
	public static void main(String[] args) {
		try {
			int a = Integer.parseInt(args[0]);
			int b = Integer.parseInt(args[1]);
			
			System.out.println(a + " / " + b + " = " + (a / b));
		} catch(ArrayIndexOutOfBoundsException e) {
			System.out.println("를 2 ");
		} catch(ArithmeticException e) {
			System.out.println("0 ");
		} catch(NumberFormatException e) {
			System.out.println("문 ");
		}
	}
}

5. try~catch~finally
- try ~ catch finally문 .
6. 모 Exception
- 모 는 Exception받는.
- Exception .
7. throws 문 / throw
throws : .
throw : .
> 100 .

>
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:34
Processing time 0.0104 sec