예외 처리(Throwing exception)
예외 처리 2
Runtime Exception
try catch finally
person 클래스
Null Point 예외
File
파일 읽고 쓰기
Location
한 줄씩 읽기(대용량)
try-with-resources(스캐너 자동 close)
한 줄일 경우 ;(세미콜론) 생략 가능
한 줄씩 쓰기(대용량)
계층 (Hierarchy)
제네릭 사용하기
제네릭 타입
ArrayList
Wrapper Class
자바 API 클래스중 하나
자바의 자료형은 primitive type(기본 타입) 과 reference type(참조 타입)
기본 타입 : byte, short, char, int, long, float, double, boolean
참조 타입 : class, interface ..
8개의 기본 타입에 해당하는 데이터를 객체로 표현하기 위해 포장해 주는 클래스가 바로 wrapper class(래퍼 클래스)이다.
wrapper class는 각 타입에 해당하는 데이터를 파라미터로 전달받아, 해당 값을 가지는 객체로 만들어준다.
배열로 요소 읽어오기
String 문자열 타입
Person 클래스 타입
ArrayList 테스트 하기