The LocalDateTime is a new class introduced in Java 8 new Date and Time API. This class is in java.time package and it represents both dat...
Tampilkan postingan dengan label Java 8. Tampilkan semua postingan
Tampilkan postingan dengan label Java 8. Tampilkan semua postingan
3 Ways to Convert Java 8 Stream to an Array - Lambda Expression and Constructor Reference Example
One of the frequently asked Java 8 questions is, how you do convert a Java 8 Stream to an array? For example, you have a Stream of Strings a...
Base64 Encoding Decoding Example in Java 8
Until Java 8, there was no standard way to Base64 encode a String in Java or decode a base64 encoded String. Java Programmers either use Apa...
Best books to Learn Java 8
I often receive emails and queries asking about some good books to learn Java 8 . Since Java 8 is very different from any other JDK release,...
How to convert java.util.Date to java.time.LocalDate in Java 8 - Example
The easiest way to convert a java.util.Date to java.time.LocalDate is via Instant, which is the equivalent class of java.util.Date in JDK 8....
3 ways to get number of months and year between two dates in Java?
Earlier I have talked about how to calculate a number of days between two dates in Java ( see here ), and now you will learn how to get the ...
10 Examples of Joining String in Java 8 - StringJoiner and String.join()
It's quite common in day to day programming to join Strings e.g. if you have an array or List of String let's say {Sony, Apple, Goog...
How to find the first element of Stream in Java 8 - findFirst() Example
In Java 8, you can use the Stream.findFirst() method to get the first element of Stream in Java. This is a terminal operation and often use...