Monthly archives "January 2016"

Java Tip of the Week #4 – Lambdas

posted by Roberto Cortez on

Java Tip of the Week #4 - LambdasThis week Java Tip of the Week is the sequel to last week Streams API episode.

Lambdas is definitely one of the most awaited features in Java. Quoting Mark Reinhold – Chief Architect of Java Platform Group, Oracle:


“Lambda is the single largest upgrade to the programming model. Ever. It’s larger even than Generics. It’s the first time since the beginning of Java that we’ve done a carefully coordinated co-evolution of the virtual machine, the language and the libraries, all together. Yet the result still feels like Java.”

Java Lambdas

Lambdas is what make the new Streams API really powerful. Nothing was stopping Java to come up with a behaviour based API to perform operations on a sequence of elements. But who wants to code like this:

When you can code like this:

Check it out in my video:

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 #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

Java Tip of the Week #1 – Lombok

posted by Roberto Cortez on

First of all, let me wish all of my readers an Excellent Year of 2016!

During 2015, I was not able to post as often as I would like. I guess the every blogger might have the same problem. I can’t make any promises, but I hope I can provide with great quality articles for 2016.

Java Tip of the Week

In the meanwhile, I’m starting a new initiative called the Java Tip of the Week. Instead of a regular blog post, it’s a video blog mostly around hands-on and live code. It’s also very short, around 5 minutes, so you can watch it on any break. It will feature all kinds of useful stuff that you can use on your everyday project. Hopefully, these would be easier to prepare than a regular blog post, so I can do more of them.

And here is the first one, about Lombok:

I will be posting them here, but be sure to follow my Youtube channel for faster updates!

Also, the work in progress for adding Lombok to the Java EE 7 Angular project:
https://github.com/radcortez/javaee7-angular/tree/lombok

I hope you enjoy it!

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