Home » Tag Archives: Lambdas

Tag Archives: Lambdas

Java 8 Lambdas in One Line

java-logo

If you understand this line, or better still can write this code you can pretty much say that you have understood the essence of Java 8 Lambdas. Certainly in as much as they can be used with collections. I found this in a recent presentation by Peter Lawrey.  (Definitely worth watching the whole presentation when you have a spare hour.) Anyway ...

Read More »

Yet another Java 8 Lamdbas and Streams example

java-logo

I’ve been lagging behind with what Java 8 features exercising concerns, so in this post I will briefly present my initial experience with lambdas and streams. As usual, I will focus on a Podcast class:               package org.codingpedia.learning.java.core; import java.util.Comparator; public class Podcast { int id; String title; String producer; int subscriptionsNumber; /** number of ...

Read More »

Java 8 Lambda Expressions Tutorial

java-logo

Greetings! :) After a few months away I decided to come back in style :). I noticed that one of my previous posts about the new Date/Time API got really popular, so this time I’m going to dedicate this post to another new feature of Java 8: Lambda Expressions. Functional Programming Lambda Expressions are the way by which the Java ...

Read More »

Using Java 8 Lambda expressions in Java 7 or older

java-logo

I think nobody declines the usefulness of Lambda expressions, introduced by Java 8. However, many projects are stuck with Java 7 or even older versions. Upgrading can be time consuming and costly. If third party components are incompatible with Java 8 upgrading might not be possible at all. Besides that, the whole Android platform is stuck on Java 6 and ...

Read More »

Java8 Lambdas: Sorting Performance Pitfall EXPLAINED

java-logo

Written in collaboration with Peter Lawrey. A few days ago I raised a serious problem with the performance of sorting using the new Java8 declarative style. See blogpost here.  In that post I only pointed out the issue but in this post I’m going to go a bit deeper into understanding and explaining the causes of the problem.  This will ...

Read More »

Java Lambdas and Low Latency

java-logo

Overview The main question around the use of Lambdas in Java and Low Latency is; Does they produce garbage and is there anything you can do about it? Background I am working on a library which supports different wire protocols. The idea being that you can describe the data you want to write/read and the wire protocol determines if it ...

Read More »

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 »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close