Java 8 Tutorials

Some Java 8 examples, hope you like it.

Index

  1. Java 8 Lambda : Comparator example
  2. Java 8 forEach examples
  3. Java 8 Streams filter examples
  4. Java 8 Streams map() examples
  5. Java 8 – Stream Collectors groupingBy examples
  6. Java 8 – Filter a null value from a Stream
  7. Java 8 – Convert a Stream to List
  8. Java – How to convert Array to Stream
  9. Java – Stream has already been operated upon or closed
  10. Java 8 – How to sort a Map
  11. Java 8 – Convert List to Map
  12. Java 8 – Filter a Map examples
  13. Java 8 flatMap example
  14. Java 8 – Convert Map to List
  15. Java 8 Optional In Depth
  16. Java – Generate random integers in a range
  17. Java 8 – StringJoiner example
  18. Java 8 Stream – Read a file line by line
  19. Java – How to join Arrays
  20. Java – How to convert String to Char Array
  21. Java – How to convert a primitive Array to List
  22. Java 8 – Math Exact examples
  23. How to install Oracle JDK 8 on CentOS
  24. How to Install Oracle JDK 8 On Debian
  25. Java Date Time Tutorials
  26. Java 8 – How to convert String to LocalDate
  27. Java – Display all ZoneId and its UTC offset
  28. Java 8 – Convert Instant to LocalDateTime
  29. How to compare dates in Java
  30. How to convert String to Date – Java
  31. Java 8 – Convert Instant to ZonedDateTime
  32. Java 8 – Convert Date to LocalDate and LocalDateTime
  33. Java 8 – ZonedDateTime examples
  34. Java 8 – How to format LocalDateTime
  35. Java 8 – Period and Duration examples
  36. Java – How to add days to current date
  37. Java 8 – TemporalAdjusters examples
  38. Java 8 – MinguoDate examples
  39. Java 8 – HijrahDate, How to calculate the Ramadan date
  40. Spring Data MongoDB + JSR-310 or Java 8 new Date APIs

References

  1. What’s New in JDK 8
  2. java.util.stream

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

avatar
19 Comment threads
3 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
22 Comment authors
Daniel Meleroadamyahoopremmkyong Recent comment authors
newest oldest most voted
Mrinmoy Dey
Guest
Mrinmoy Dey

From last 5 years,I am referring Mkyong.com whenever I need help. Thanks..

don k4sperski
Guest
don k4sperski

Excellent java 8 resources

Ngoc Khuong
Guest
Ngoc Khuong

Thank you :)))

prem
Guest
prem

One of the most important features of lambdas is behind the scenes it supports optimisation using invokedynamic. Also the streams api does very well when used in parallel mode on multi cpu, multi core machines. I found more about that here
https://stackrules.com/learn-java-8-streams-api-in-an-hour/

lucas
Guest
lucas

can’t say anything for article. tks so much. love u

Bimal Parajuli
Guest
Bimal Parajuli

I have been referring to this website for a long time ago. I like the way information is shared on this website. The explanation of the requirement and scenario is very clearly documented. The font-size, color combination, text format and wrapper of the code is eye-catching. I would use this website because it has a clear explanation of the topic and solution. It has good examples written in pretty understandable, easy and simple language. Usually, I don’t write the review for any of the websites that I follow but this website has helped me a lot on solving my project… Read more »

Tu Hoa Tri
Guest
Tu Hoa Tri

May be you lack of “match” method…

duliu
Guest
duliu

Good

Daniel Melero
Guest
Daniel Melero

Thanks, you are the man!

adam
Guest
adam

Great explanations , do you offer training ?

srini
Guest
srini

where is the definition for Developer.java?

Kondalarao
Guest
Kondalarao

Nice examples.. Thank you

Madhu
Guest
Madhu

Very good java 8 resource.

sathyamurthy
Guest
sathyamurthy

Hi
Thank you so much and please provide source code too.
Sathya

Smithb636
Guest
Smithb636

hi!,I love your writing so much! share we communicate more approximately your post on AOL? I need an expert in this space to resolve my problem. Maybe that’s you! Looking forward to peer you. kabackkckkebkbce

zako
Guest
zako

Nice tutorial !

Anirban Chatterjee
Guest
Anirban Chatterjee

StackOverflow and MkYoung you are next to Oracle(Sun) when it is about Java :)

yahoo
Guest
yahoo

hgh

arasu
Guest
arasu

try to add all methods in java8 otherwise super.

cebulak
Guest
cebulak

I never paid and I will never pay for your tutorials, donations are not for open source people!

shaikh
Guest
shaikh

Hey he cebulak, he is not asking to donate money for himself.He is asking if you want then you can donate to charity organizatons like Unicef,