1. static 대
4. try ~ catch
5. try~catch~finally
>
- static 래 되는 변로 명 닌 래명로 된다.
2. Math래 기래 Wrapper 래
- Math래는 각 들 되 다.
3. static import
- abs() : 대값 구다.
- sqrt() : 근 구다.
- max(), min() : 대/값 구다.
- round() : 반림다.
- pow() : 다.
- PI : 를 나내는
- 각 Wrapper래(Integer, Double, Character...)
- sqrt() : 근 구다.
- max(), min() : 대/값 구다.
- round() : 반림다.
- pow() : 다.
- PI : 를 나내는
- parseXXX : String 각 로 변다.
- toString : 를 문 로 반다.
- toString : 를 문 로 반다.
- 래 명 기가 귀때.....
> 2방 를 구는 로그램 보.
~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("문 "); } } }
- try ~ catch 구문 무 finally문 다.
6. 모든 래 Exception
- 모든 는 Exception래를 는다.
- 가 Exception 다.
7. throws 구문 / throw 구문
- 가 Exception 다.
throws : 는 리 고 때 다.
throw : 로 를 발고 때 다.
> 100 가 력되 때 를 발는 로그램 보.
throw : 로 를 발고 때 다.