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 |
Tags
- 외부설정
- OAuth2
- JPA
- 리소스핸들러
- 백트래킹
- 알고리즘
- 백기선
- webjar
- @ConfigurationProperties
- EnableAutoConfiguration
- rest api
- 백준
- 스프링 부트
- Spring Security
- 다익스트라
- WebApplication Type
- 스프링부트
- Application Event
- @Profile
- application.properties
- 리소스 서버
- 브루트포스
- cors
- HATEOAS
- 정적 리소스
- JsonSerializer
- AuthenticationPrincipal
- HttpMessageConverters
- Application Argument
- Application Runner
Archives
- Today
- Total
아카이브
String 과 StringBuffer/StringBuilder 본문
String 과 StringBuffer/StringBuilder
- String 객체는 immutable (초기화 이후 값을 변경할 수 없음)
- String 연산 시, 기존의 객체를 변경하지 않고 새로운 String 객체를 만들어야 함
- StringBuffer/StringBuilder는 새로운 객체를 생성하지 않고 동일한 객체를 지속적으로 변경할 수 있음
● StringBuffer는 Thread-safe, StringBuilder는 해당 없음
- String 연산 시 JVM이 String을 StringBuffer로 변환하기 때문에 오버헤드 발생 (String -> StringBuffer -> String)
'Java' 카테고리의 다른 글
HashMap과 HashTable (0) | 2021.01.06 |
---|---|
equals()메소드와 hashCode()메소드 (0) | 2018.06.27 |
final 키워드 (0) | 2018.06.27 |
Interface와 abstract class (0) | 2018.06.18 |