Skip to content

Instantly share code, notes, and snippets.

View bactoria's full-sized avatar
🎯
Focusing

황준오 bactoria

🎯
Focusing
View GitHub Profile
@benelog
benelog / java-string-concat.md
Last active April 14, 2023 13:42
String 최적화 JDK 1.5

jdk1.5에서 String 더하기의 컴파일시의 최적화]

String 클래스를 "+"로 반복해서 더하는 연산을 어떤 경우에 컴파일러에서 자동으로 최적화해주는지 알고 있다면 보다 융퉁성 있게 쓸 수가 있습니다.

몇년전에 javaservice.net에서의 String vs StringBuffer에 대한 논의에서도 이 이야기가 오고 갔었고, 그를 통해 제가 알게 되었던 바는 다음과 같습니다.

  1. 한줄에서 상수 String끼리만 더하는 것은 모두 합쳐진 문자열로 바꿔준다. 즉 String a= "a" + "b" + "c"; 라고 쓰면 String ="abc"; 로 알아서 컴파일해준다는 거죠.
  2. 한줄에서 상수와 다른 String 클래스를 더하는 것은 StringBuffer의 append, toString 메서드를 쓰는 코드로 준다. jdk 1.4 javadoc 의 StringBuffer API설명 에 명시되어 있네요.

String buffers are used by the compiler to implement the binary string concatenation operator . For example, the code:

@ihoneymon
ihoneymon / springboot-fundamental.md
Last active April 21, 2020 04:51
스프링부트springboot 이야기

1-1 스프링부트springboot 이야기

1. 스프링부트springboot란?

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

  • 스프링부트는 단독실행되는, 실행하기만 하면 되는 상용화 가능한 수준의 스프링 기반 애플리케이션을, 쉽게 만들어낼 수 있다.
  • 최소한의 설정으로 스프링 플랫폼과 서드파티 라이브러리들을 사용할 수 있도록 하고 있다.

1.1. 스프링부트 기능