Home » Tag Archives: Lambdas (page 2)

Tag Archives: Lambdas

Instances of Non-Capturing Lambdas

java-logo

Roughly a month ago, I summarized Brian Goetz’ peek under the hood of lambda expressions in Java 8. Currently I’m researching for a post about default methods and to my mild surprise came back to how Java handles lambda expressions. The intersection of these two features can have a subtle but surprising effect, which I want to discuss. Overview To ...

Read More »

Why Now is the Perfect Time to Upgrade to Java 8

java-logo

Interested to see how you can get the most out of the new Java 8 features with AppDynamics? Start a FREE trial now! This past March, Oracle released their most anticipated version in almost decade, Java 8. The latest version had a growing buzz since it had been announced, and companies of all sizes were eager to upgrade. Our partner, ...

Read More »

Book Review: Mastering Lambdas: Java Programming in a Multicore World

java-logo

λ-programming (lambda-programming) has finally been introduced in the Java world as of version 8. It is the feature that will mostly change the way Java developers program and a new ‘weapon’ against boilerplate code. Java 8 has mostly applied functional programming in the Collections API by introducing the new Stream API. Additionally, this new feature promises to offer us a ...

Read More »

Java SE 8 new features tour: Traversing, filtering, processing collection, & methods enhancements with Lambda

java-logo

In this article of the “Java SE 8 new features tour” series, we will deep dig into explanation, and exploring the code, on how to traverse the collections using lambda expression and with method references, filtering them with predicate interface, implementing default methods in interfaces, and finally implementing static methods in interfaces. In the previous article “Functional programming with Lambda ...

Read More »

Don’t Miss out on Writing Java 8 SQL One-Liners with jOOλ or jOOQ

jooq-2-logo

More and more people are catching up with the latest update to our platform by adopting functional programming also for their businesses. At Data Geekery, we’re using Java 8 for our jOOQ integration tests, as using the new Streams API with lambda expressions makes generating ad-hoc test data so much easier. However, we don’t feel that the JDK offers as ...

Read More »

lambdas and side effects

java-logo

Overview Java 8 has added features such as lambdas and type inference. This makes the language less verbose and cleaner, however it comes with more side effects as you don’t have to be as explicit in what you are doing. The return type of a lambda matters Java 8 infers the type of a closure. One way it does this ...

Read More »

Clean JUnit Throwable-Tests with Java 8 Lambdas

junit-logo

Recently I was involved in a short online discussion on twitter and google+ which concerned the question why the arrival of Java 8 Lambda expressions makes the catch-exception library1 obsolete. This was triggered by a brief announcement that the library won’t be longer maintained as lambdas will make it redundant. The answer I came up with at that time has ...

Read More »

Mapping your Entities to DTO’s Using Java 8 Lambda expressions

java-logo

We all facing the cluttered overhead code when we need to convert our DTO’S to Entities(Hibernate Entities, etc..) and backwards. In my example ill demonstrate how the code is getting much shorter with Java 8. Let’s create the Target DTO:             public class ActiveUserListDTO { public ActiveUserListDTO() { } public ActiveUserListDTO(UserEntity userEntity) { this.username = ...

Read More »

Lambda Expressions and Stream API: basic examples

java-logo

This blog post contains a list of basic Lambda expressions and Stream API examples I used in a live coding presentation I gave in June 2014 at Java User Group – Politechnica Gedanensis (Technical University of Gdańsk) and at Goyello. Lambda Expressions Syntax The most common example:     Runnable runnable = () -> System.out.println("Hello!"); Thread t = new Thread(runnable); ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.