String testString = new String("김준석");
String testString_2 = new String("김준석");
String testString_3 = "김준석";
String testString_4 = "김준석";
System.out.println(testString); //출력값: 김준석
System.out.println(System.identityHashCode(testString));
//출력값: 1365202186
System.out.println(System.identityHashCode(testString_2));
//출력값: 1651191114
System.out.println(System.identityHashCode(testString_3));
//출력값: 1586600255
System.out.println(System.identityHashCode(testString_4));
//출력값: 1586600255
int와 같이 앞이 소문자이면 기본타입으로 변수안에 값을 저장
String과 같이 앞이 대문자이면 같은 데이터일 경우 같은 주소값을 가짐
new라고 쓰면 독립적인 메모리 공간을 할당해줌(메모리 주소가 달라짐)
메모리주소 : 메모리 영역을 알 수 있는 번지수
identityHashCode(); : 메모리 주소를 반환해주는 메서드