Java 7 New Features
Java SE 7 Features and Enhancements:
http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html
A look at Java 7's new features:
http://radar.oreilly.com/2011/09/java7-features.html
Concurrency Utilities Enhancements & Fork/Join:
http://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html
Strings in switch Statements:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html
引用
String.equals 作为比较的依据,并且字符串是大小写敏感的
Objects 工具类,使用举例如下:
Objects.requireNonNull(someObject); someObject.doCalc();
Generics 声明时使用 Diamond Operator <>:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/type-inference-generic-instance-creation.html
before:
Mapnow:> anagrams = new HashMap >();
Map> anagrams = new HashMap<>();
Underscores in Numeric Literals:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html
Binary Literals 二进制整数:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/binary-literals.html
Underscores in Numeric Literals & Binary Literals 可参见本:
http://wuaner.iteye.com/admin/blogs/1668172
Java 8 New Features
http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html