DecimalFormat(2)
-
Formater, parse, MessageFormat, 콜렉션, 제네릭
-------------------------------Formater------------------------------------- ========SimpleDateFormat, DecimalFormat========SimpleDateFormat// 날짜 포맷팅Date -> TextString format(Date date) DecimalFormat// 숫자 포맷팅 Number -> TextString format(int number)String format(double number) 아래처럼 사용 가능하다. format format --------------- -------------- | | | | | v | vDate문자숫자문자^ |^ | | | | | --------------- ------..
2019.03.20 -
Exception, 예외정보 출력, NullPointerException, ArrayIndexOutOfBoundsException, StringIndexOutofBoundsException, , NumberFormatException , ArithmethicException , ClassCastException , Calendar, Formater, ceil, floor, round
-----------------------------Exception-------------------------------------------------- Exception 을 사용하는것은 모두 일반예외이다. 예외정보 얻기, 출력하기 .getMessage() - 사용할경우 예외 메시지만 보여준다.toString() - getMessage()보다는 더 자세한 예외가 출력.printStackTrace() - 가장 자세한 예외를 보여주며 주로 사용 (예시) Sysout.out.println를 System.err.println로 바꾸면 에러 출력 글자색이 빨간색으로 보인다 Exception 클래스를 상속받을때 생성자중 (String message)를 받는 생성자를 주로 많이 쓴다. ## 사용자 정의 일반 예..
2019.03.19