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