Comments (1)
- Java 버전별 String Class 변경 사항
- JDK 1.5 버전 이전에서는 문자열 연산(+, concat)을 할 때 조합된 문자열을 새로운 메모리에 할당하여 참조해 성능상의 이슈 존재
- JDK 1.5 버전 이후에는 컴파일 단계에서 String 객체를 StringBuilder로 컴파일 되도록 변경됨
- 그래서 JDK 1.5 이후 버전에서는 String 클래스를 사용해도 StringBuilder와 성능 차이가 없어짐
- 하지만 반복 루프를 사용해서 문자열을 더할 때에는 객체를 계속 새로운 메모리에 할당함
- String 클래스를 사용하는 것 보다는 스레드와 관련이 있으면 StringBuffer, 스레드 안전 여부와 상관이 없으면 StringBuilder를 사용하는 것을 권장
from tech-interview.
Related Issues (20)
- [DB] Index란
- [Spring] Spring, Spring MVC, Spring Boot의 차이
- [OS] 동기와 비동기
- Thread 한글 표기 통일 HOT 1
- [DB] ORM이란 HOT 1
- [DB] JDBC
- [JAVA] 동기화와 비동기화의 차이
- [OS] 가상 메모리란?
- [Network] HTTP와 HTTPS
- [Network] HTTP 요청, 응답 헤더 내용 정리
- [중요] 오타 및 틀린 내용 수정 필요 HOT 2
- [Java] ThreadLocal이란
- [Network] CORS란
- [JavaScript] Hoisting이란 HOT 1
- cs1
- Good! HOT 1
- SOLID 원칙 약자가 잘못되어 있습니다. HOT 2
- .
- 논리형 : boolean(ture/false)
- [JAVA] 객체란?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tech-interview.