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