Java Method References: The Ultimate Shortcut for Cleaner Code

Introduction To understand the evolution of Java 8, think of it this way: Essentially, a Method Reference says: “Don’t write the logic yourself; just use this existing method that already fulfills the contract.” Okay, but how do I actually write one? The magic happens with the Double Colon Operator (::). This operator is the syntax … Ler mais

Java 8 Functional Interfaces: The Foundation of Lambda Expressions

Introduction If Lambda Expression are the stars of Java 8, Functional Interfaces are certainly the stage where they can shine. Without understanding Functional Interfaces, Lambda Expressions may seem like syntactic magic. In reality, they are simply a more concise way to implement them. In this post, we will explore what functional interfaces are, why they … Ler mais

Lambda Expressions: Syntax, Examples, and Concepts

Introduction Some Java versions are very important to the language. I think Java 8 was one of these versions. Released on March 2014, the Java 8 brought a paradigm shift to the Java Language with an introduction of Lambda Expression. This feature was so important and changed how the developers write their code. What are … Ler mais