// br automatically closed try // some code catch (SQLException | IOException e) // single block logger.log(e); throw new MyAppException(e);
int million = 1_000_000; long creditCard = 1234_5678_9012_3456L; Binary Literals int mask = 0b1010_0101; // prefix 0b or 0B 2. New File I/O (NIO.2) – java.nio.file Replaced legacy File class. java 7
class MyRecursiveTask extends RecursiveTask<Long> private long workload; MyRecursiveTask(long w) workload = w; protected Long compute() if (workload < 2) return workload; MyRecursiveTask subtask = new MyRecursiveTask(workload - 1); subtask.fork(); return workload + subtask.join(); // br automatically closed try // some code
For parallel processing (divide and conquer). throw new MyAppException(e)