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.0096 sec