Back-end/Java
[Java] String = " " VS new String(" ")
호비_hobi
2022. 3. 8. 13:15
- new 연산자 생성
Heap 영역 존재
String hobi = new String("hobi");
- 문자열 리터럴 생성
string constant pool 영역 존재
String hobi = "hobi";
참고: https://haenny.tistory.com/18
참고: https://ict-nroo.tistory.com/18