전체 글
-
[JAVA] JAVA 15 주요 변경점JAVA 2024. 9. 20. 22:05
네, 이해했습니다. 14개 항목을 모두 포함하여 Java 15의 주요 변경사항에 대한 블로그 포스트를 작성해 드리겠습니다.Java 15의 주요 변경사항 총정리Java 15가 2020년 9월에 출시되었습니다. 이번 버전은 단기 지원 릴리스로, 다양한 새로운 기능과 개선사항을 포함하고 있습니다. 이번 포스트에서는 Java 15의 14가지 주요 변경사항을 자세히 살펴보겠습니다.1. 텍스트 블록 (표준 기능)이전 버전에서 preview로 도입된 텍스트 블록이 이제 표준 기능으로 채택되었습니다.String html = """ Hello, World! ..
-
[JAVA] JAVA 14 주요 변경점JAVA 2024. 9. 19. 22:05
Java 14의 주요 변경사항 총정리Java 14는 2020년 3월에 출시된 단기 지원 버전으로, 다양한 새로운 기능과 개선사항을 도입했습니다. 이번 포스트에서는 Java 14의 주요 변경사항들을 자세히 살펴보겠습니다.1. Switch 표현식 (표준화)이전 버전에서 preview로 도입된 switch 표현식이 이제 표준 기능으로 채택되었습니다.주요 특징:화살표(->)를 사용한 간결한 case 라벨 구문'yield' 키워드를 사용하여 switch 표현식에서 값 반환 가능예시 코드:int numLetters = switch (day) { case MONDAY, FRIDAY, SUNDAY -> 6; case TUESDAY -> 7; case THURSDAY, SATURDAY -> 8; d..
-
[JAVA] JAVA 13 주요 변경점JAVA 2024. 9. 18. 22:05
Java 13의 주요 변경사항 총정리Java 13은 2019년 9월에 출시된 단기 지원 버전으로, 몇 가지 흥미로운 기능과 개선사항을 도입했습니다. 이번 포스트에서는 Java 13의 주요 변경사항들을 자세히 살펴보겠습니다.1. 텍스트 블록 (Preview 기능)Java 13에서는 여러 줄의 문자열을 쉽게 작성할 수 있는 텍스트 블록 기능이 preview로 도입되었습니다.주요 특징:삼중 따옴표(""")로 둘러싸인 형태로 사용문자열 내의 줄바꿈과 들여쓰기가 그대로 유지됨가독성 향상 및 이스케이프 문자 사용 감소예시 코드:String html = """ Hello, World! ..
-
[JAVA] JAVA 12 주요 변경점JAVA 2024. 9. 17. 22:05
Java 12는 2019년 3월에 출시되었습니다. 이번 버전은 단기 지원 릴리스로, 다양한 새로운 기능과 개선사항을 포함하고 있습니다. 이번 포스트에서는 Java 12의 7가지 주요 변경사항을 자세히 살펴보겠습니다.1. 스위치 표현식 (Switch Expressions)Java 12에서는 스위치 표현식이 프리뷰 기능으로 도입되었습니다. 이는 스위치 문을 더 간결하고 표현력 있게 만들어 줍니다.int numLetters = switch (day) { case MONDAY, FRIDAY, SUNDAY -> 6; case TUESDAY -> 7; case THURSDAY, SATURDAY -> 8; case WEDNESDAY -> ..
-
[JAVA] JAVA 11 주요 변경점JAVA 2024. 9. 16. 22:08
Java 11의 주요 변경사항 총정리Java 11은 2018년 9월에 출시된 장기 지원 버전(LTS)으로, 여러 가지 중요한 기능과 개선사항을 도입했습니다. 이번 포스트에서는 Java 11의 주요 변경사항들을 자세히 살펴보겠습니다.1. 새로운 문자열 메서드String 클래스에 여러 유용한 메서드가 추가되었습니다.주요 메서드:isBlank(): 문자열이 비어있거나 공백만 포함하는지 확인lines(): 문자열을 줄 단위로 스트림으로 변환strip(), stripLeading(), stripTrailing(): 문자열의 앞뒤 공백 제거repeat(int): 문자열을 지정된 횟수만큼 반복예시 코드:String str = " Hello Java 11 ";System.out.println(str.strip())..
-
[JAVA] JAVA 10 주요 변경점JAVA 2024. 9. 15. 22:06
Java 10의 주요 변경사항 총정리Java 10은 2018년 3월에 출시된 단기 지원 버전으로, 여러 가지 새로운 기능과 개선사항을 도입했습니다. 이번 포스트에서는 Java 10의 주요 변경사항들을 자세히 살펴보겠습니다.1. 지역 변수 타입 추론 (var 키워드)Java 10의 가장 큰 변화는 'var' 키워드의 도입입니다. 이를 통해 지역 변수의 타입을 명시적으로 선언하지 않아도 컴파일러가 자동으로 추론할 수 있게 되었습니다.주요 특징:지역 변수에만 사용 가능합니다.초기화가 필요합니다.가독성을 높이고 불필요한 타입 선언을 줄여줍니다.예시 코드:var list = new ArrayList(); // ArrayList 타입으로 추론var number = 42; // int 타입으로 추론var text..
-
[JAVA] JAVA 9 주요 변경점JAVA 2024. 9. 14. 21:00
Java 9의 주요 변경사항 총정리Java 9은 2017년 9월에 출시된 메이저 업데이트로, 많은 새로운 기능과 개선사항을 도입했습니다. 이번 포스트에서는 Java 9의 주요 변경사항들을 자세히 살펴보겠습니다.1. 모듈 시스템(Java Platform Module System) 도입Java 9의 가장 큰 변화는 모듈 시스템의 도입입니다. 이를 통해 Java 플랫폼을 모듈화하고 애플리케이션을 모듈 단위로 개발할 수 있게 되었습니다. 주요 특징: 모듈은 관련 패키지와 리소스를 그룹화하고 의존성을 명시적으로 선언합니다. module-info.java 파일을 통해 모듈을 정의합니다. 캡슐화를 강화하여 내부 API의 사용을 제한할 수 있습니다. 의존성 관리가 개선되어 대규모 애플리케이션 개발이 용이해집니다. 예시..
-
[KOTLIN] InvalidDefinitionException: Cannot construct instance of `XXX` (no CreaKOTLIN 2024. 8. 21. 23:34
코프링(Koltin + Spring)에서 Jackson의 ObjectMapper를 커스텀하게 만들어 사용할 경우 InvalidDefinitionException이 발생할 수 있다.[Cannot construct instance of `XXX` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)] 코틀린의 경우 클래스에 기본 값을 설정하지 않으면, 기본 생성자를 생성하지 않아 발생하는 예외이다. 그렇다고 일일히 클래스에서 기본 값을 설정하는 것은 좋은 방법이 아니다. 이를 해결하기 위해서는 스프링 부트 웹에서 빈으로 등록되는 Objec..