참조
블로그:
https://blog.naver.com/PostView.naver?blogId=ssookie_&logNo=222432977225&parentCategoryNo=&categoryNo=6&viewDate=&isShowPopularPosts=true&from=search
Null 초기화
원시형 타입은 null 초기화가 불가능 하지만 객체형 타입은 null 초기화가 가능함
int와 Integer 통해 비교
int는 원시형 변수로 실제 값의 저장 장소를 가짐
Integer는 객체형 변수로 참조형, 즉 실제 값이 아닌 객체의 주소를 저장함으로써 null 초기화가 가능
또한 Integer는 wrapper 클래스로서 int보다 다양한 연산을 제공