Learn Java and Programming through articles, code examples, and tutorials for developers of all levels.
10 Examples of Stream API in Java 8 - count + filter + map + distinct + collect() Examples
How to debug Java 8 Stream Pipeline - peek() method Example Tutorial
How to convert ArrayList to HashMap and LinkedHashMap in Java 8 - Example Tutorial
Java 8 Stream map() function Example with Explanation
11 Examples of LocalDate, LocalTime, and LocalDateTime in Java 8
3 Examples to Convert Date to LocalDate in Java 8? Tutorial
How to Convert Date to LocalDate in Java 8 - Example Tutorial
How to convert Date to LocalDateTime in Java 8 - Example Tutorial
10 Examples to DateTimeFormatter in Java 8 to Parse, Format LocalDate and LocalTime
How to Format Date to String in Java 8 [Example Tutorial]
How to Convert java.util.Date to LocalDate in Java 8 - Example Tutorial
How to parse String to LocalDate in Java 8 - DateTimeFormatter Example
How to Convert String to LocalDateTime in Java 8 - Example Tutorial
How to find difference between two dates in Java 8? Example Tutorial
How to get current Day, Month, Year from Date in Java? LocalDate vs java.util.Date Example
Top 10 Java 8 Tutorials, Classes, and Courses in 2025 - Best of Lot [UPDATED]
How to Convert String to LocalDate, LocalTime, LocalDateTime and ZonedDateTime in Java? Example Tutorial
The JDK 8 added a new Date and Time API (JSR 310) which introduces new date and time classes like LocalDate, LocalTime, LocalDateTime, and ZonedDateTime. Now, if you have a String e.g. "2016-12-14 03:30" then how do parse it to LocalDate, LocalTime, LocalDateTime and ZonedDateTime? Similarly, if you have an instance of those classes how you can format to the String you want e.g. in dd/MM/yyyy format, or USA or UK format? Well, Java 8 provides a utility class called DateTimeFormatter which can be used to parse/format dates in Java 8. It also provides several built-in formatter e.g. ISO date format and other to facilitate formatting of dates to String.
How to convert JSON to Map in Java 8 without using third party libraries like Jackson or Gson
Hello guys, If you are working with JSON data then you may know that JSON is collection of key value pairs and that's why many times, you also need to convert them into a Map in Java. While there are many Java libraries like Jackson and Gson which provides support of parsing JSON to Java objects, there is not much support for JSON parsing or manipulation on standard JDK. While JSON parsing is still a long overdue, starting with JDK 8u60+ the built-in Nashorn engine is capable to convert JSON content into java.util.Map. No external dependencies are required for parsing JSON in to Map as you will learn in this article.