try-with-resources 블럭 선언
try( //io객체 선언){ //io객체 사용}catch(Exception ex){ ex.printStackTrace(); }
b. try문 안으로 자원이 선언되면 해당 자원은 자동으로 닫히게 됨.