Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Runtime data area
- resilience4j
- intelij
- 코딩테스트
- java
- GC
- try-catch
- n+1
- execution engine
- jvm
- 날짜쿼리
- circuitbreaker
- optional
- Kotlin
- 4-way-handshake
- AutoCloseable
- Class Loader
- springboot
- feign
- jetbrain
- webflux
- try-with-resources
- 동작방식
- closeable
- Hotspot VM
- try-catch-finally
- zipWith
- 람다표현식
- wagon-ssh
- tcp
Archives
- Today
- Total
목록StringBuilder (1)
JuBin's personal study blog
[JAVA] String, StringBuilder, StringBuffer 차이점
String String은 불변(Immutable) 속성을 갖는다. 멀티쓰레드 환경에서 안전하다(thread-safe) String str = "hello~"; // String str = new String("hello~") - 1 str = str + "world"; - 2 1) str은 stack영역에 저장, "hello~"는 heap영역에 저장된다 2) str은 stack영역에 그대로지만 "hello~"는 Garbage가되고 str은 새로운 "hello~world"를 참조한다. 연산이 적은(문자열 추가, 수정, 삭제) 경우 사용하면 좋은성능을 기대할 수 있다. 알고리즘에 String클래스를 사용하면 Heap영역에 많은 Garbage가 쌓여 힙메모리 부족현상이 일어날 수 있다. 따라서 연산횟수가 많..
JAVA
2021. 4. 14. 10:21