Postingan

Menampilkan postingan dengan label java 9

Java 9 Example - Factory Methods for Collection - Creating Unmodifiable List, Set, and Map

Gambar
Hello guys, this is my first article in Java 9 features on this blog and today you'll learn about my favorite feature "factory methods for collection" , which is introduced as part of JEP 269. The JEP stands for JDK enhancement proposal. If you have worked in Groovy or Kotlin then you know that how easy is to create the list with elements using collection literals e.g. to create a list of 1, 2, 3 you can simply write val items = listOf(1, 2, 3). Unfortunately, Java doesn't support that yet but things have been improved with the factory methods for collection in JDK 9 and it's almost like that. JDK has added static factory methods like of() on to basic Collection interfaces which you can use to create a list of items. Even though the Project Jigsaw or Java Module systems is the main highlight of Java 9 release, there are several other useful features which are more helpful from development point of view e.g. process API enchantment, Stream API enhancements and some...

Top 5 Online Courses to Learn Java 9 and Modules - Best of Lot

Gambar
The last couple of years was the year of releases for Java developer. With versions of JDK 9 to JDK 13, Spring 5, Spring Boot 2.0, and Spring Security 5.0, there was so much to learn for Java developers and all at once, but like many others, I didn't make a good process, and I am looking to turn it around this year. One of my top priority goals for New Year to learn new features of Java 9 as quickly as possible to write more about it. It's also essential for you to learn Java 9 quickly to improve your career prospects. Java 9 intends to change the way Java developers used to write code. It introduces a modular JDK so that developers can only include the modules that they need. Even though the main focus of JDK 9 was modules and JShell, but there is much more to learn in terms of API Enhancements, like static methods on Collections, which allows you to create an immutable list, set, and map in Kotlin and Groovy Style. There are more in terms of Process API enhancements, Stream A...