Java 7 [2021] [360p]
int million = 1_000_000; long creditCard = 1234_5678_9012_3456L;
For parallel processing (divide and conquer).
Java 7: The Bridge to Modern Development Released in July 2011, (codenamed "Dolphin") stands as one of the most pivotal milestones in the history of the Java programming language. It was the first major release under Oracle’s stewardship following the acquisition of Sun Microsystems, arriving five years after Java 6. java 7
: Simplified generic instance creation by allowing the compiler to infer type arguments .
To improve readability, you could write 1_000_000 instead of 1000000 . 2. The NIO.2 File System (JSR 203) : Simplified generic instance creation by allowing the
String day = "MONDAY"; switch (day) case "MONDAY": System.out.println(1); break; case "TUESDAY": System.out.println(2); break; default: System.out.println(0);
// Before: Map<String, List<String>> map = new HashMap<String, List<String>>(); Map<String, List<String>> map = new HashMap<>(); // Diamond The NIO
: Added support for using String objects in switch statements, which previously only supported primitives and enums .