Java 9

JShell JDK 9 is planning to add JShell for REPL(Read-Eval-Print Loop) functionality in Java platform. JShell is a command-line tool for quickly running statements. JShell provides a way to interactively evaluate declarations, statements, and expressions in Java. So, we don’t need to create a class with main method to test some code. Getting started …

Java 9 added new static factory methods on the List, Set, and Map interfaces make it simpler to create immutable instances of those collections. Set.of() for creating immutable Set Map.of() for creating immutable Map List.of() for creating immutable List Immutable Set using Set.of() Creating a small immutable Collection in Java using the traditional way …

What are Private Methods in an Interface ? Java 8 introduced the concept of default methods in Interface. It basically lets us provide a default implementation for a method in an interface. For example : So, unless the method hello() is overridden in the child class, we can still call it with a name (e.g. …