#067 JDK 7
1. Improved Type Inference for Generic Instance Creation
- 단순해진 Generics
이전 :
Map<String, List<String>> anagrams = new HashMap<String, List<String>>();
JDK7 :
Map<String, List<String>> anagrams = new HashMap<>();
- 레퍼런스 : http://mail.openjdk.java.net/pipermail/coin-dev/2009-February/000009.html
2. Language support for collections
- Java 코드의 사이즈를 줄여주고, 가독성을 높여줌
이전 :
final List<Integer> piDigits =
Collections.unmodifiableList(Arrays.asList(3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9 ));
JDK7 :
final List<Integer> piDigits = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9];
- 레퍼런스 : http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/001193.html
3. Automatic Resource Management
- exception handling을 줄여줌
- C++’s RAII과 C#’s using에...