Results for tag "java-tips"

Java Tip of the Week #3 – Streams

posted by Roberto Cortez on

This week Java Tip of the Week is about Streams.

Java Streams

Streams was a much needed feature in Java. They revolutionize the way we perform operations in Collections. For examples, now you don’t need to perform multiple for each statements to filter, sort or print elements.

The Streams API ships with all kinds of operations, including the previously described ones, but also map, group, reduce and many others.

Since I’ve started using them, I find it very hard to write code in Java 7 again, without this excelente API. Check out this small video about it:

Remember to follow my Youtube channel for faster updates!

Leave a comment if you enjoyed it, if not leave one as well!

Share with others!
  • Twitter
  • Facebook
  • LinkedIn
  • Google Plus
  • Reddit
  • Add to favorites
  • Email
  • RSS

Java Tip of the Week #2 – Optional

posted by Roberto Cortez on

This week Java Tip of the Week is about Optional.

Java Optional

Optional was something new introduced in Java 8 that allows you to wrap a value that might be null. By using Optional, you can perform operations to check if a value exists, get the value, return a default if no value exists or do something if it does.

I do find it very useful and I’ve been using it heavily in my last few projects. Check out this small video about it:

Remember to follow my Youtube channel for faster updates!

Leave a comment if you enjoyed it, if not leave one as well!

Share with others!
  • Twitter
  • Facebook
  • LinkedIn
  • Google Plus
  • Reddit
  • Add to favorites
  • Email
  • RSS