1. Primitive Type
(boolean, byte, short, int, long, float, double, char)
2. Reference Type
java.lang.Object
클래스를 상속하는 모든 클래스Gabage Collector
가 돌면서 메모리를 해제함int[] array ={1,2};
int[] array2 =array;
array2[2]=3;
======>array-> {1,3}, array2->{1,3} 같은 결과 출력
3. Auto Boxing & Auto Unboxing
int i=10;
Integer num=new Integer (i); //boxing
Integer num=new Integer (10);
int i=num.intValue(); //unboxing
Integer, Long, Float, Double, Boolean
reference
https://gyoogle.dev/blog/computer-language/Java/Primitive%20type%20&%20Reference%20type.html
https://yeko90.tistory.com/entry/c-%EB%B0%95%EC%8B%B1-%EC%96%B8%EB%B0%95%EC%8B%B1-%EA%B0%9C%EB%85%90