Posts related to tag: Java 9


Arrays.asList() vs. List.of() in Java

List.of and Arrays.asList are both used to create lists in Java, but they have some differences: 1. List.of() Introduced in […] Continue reading »

Java Map.of() vs Map.ofEntries() Method

In Java, the Map.of() and Map.ofEntries() static factory methods were introduced in Java 9 as part of the java.util.Map interface […] Continue reading »

Java 9- Creating Collection using Factory Method of(…)

Java 9 introduced static factory method of(...) to create the unmodifiable collection instance for the List, Set, and Map. It […] Continue reading »