Thursday Oct 29, 2015

JavaOne 2015: Streams: The Real Powerhouse in Java 8 [CON8367]

Earlier this week, Venkat Subramaniam (President, Agile Developer, Inc.) presented [CON8367] entitled Streams: The Real Powerhouse in Java 8. This presentation discussed how streams relate to collections. This presentation also discussed usage patterns and the benefits of designing APIs with streams.

For more information on JDK 8 streams, see Aggregate Operations, Collections, and Lambda Expressions in the Java Tutorials.

Wednesday Oct 28, 2015

JavaOne 2015: New Tricks for Old Dogs: Collections Enhancements in Java 8 [CON7432]

On Wednesday, October 28th, Michael Duigou (Senior Software Engineer, Liquid Robotics) and Stuart Marks (Principal Member of Technical Staff, Oracle) discuss exciting new features introduced in Java 8 to the Java collections framework and the java.util.concurrent collections. This session [CON7432] examines these new features to show how they can be used to improve the performance, clarity, and maintainability of existing code. It also looks at how to begin using the Java 8 Stream API with existing applications.

For more information see:

Monday Oct 26, 2015

JavaOne 2015: Programming with Lambdas [CON8366]

On Monday, October 26th, Venkat Subramaniam (the President of Agile Developer, Inc.) presents session CON8366, an example-driven presentation describing how to use lambdas and method references in Java. This presentation takes a peek under the hood to reveal how and why you would want to implement lambdas in Java.

This session takes place at 4:00 p.m. in the Hilton-Continental Ballroom 5.

For more information about programming with Lambdas, see the The Java Tutorials - Lambda Expressons.

Wednesday Jul 01, 2015

JDK 8 Massive Open and Online Course: Lambdas and Streams Introduction

Want to learn about Lambda Expressions and Streams in JDK 8? Then consider taking the FREE 3-week Oracle JDK 8 Massive Open and Online Course: Lambdas and Streams Introduction.

This course is designed to answer your questions and more.

  • Have you ever wondered what Lambda expressions are in Java?
  • Have you ever wanted to write parallel code in Java without worrying about threads and locking?
  • Have you ever wanted to process collections of data without using loops?
  • Have you ever wanted to do functional programming in Java?

All of these questions will be answered in this practical hands-on MOOC. This course introduces two major new changes to the Java platform: Lambda expressions and the Stream API.

Follow this link to enroll now!

Tuesday Sep 30, 2014

JavaOne 2014: Lambda Expressions in Java ME Embedded

Today at JavaOne, Sergey Troshin, a staff engineer at Oracle, gives a presentation on Lambda Expressions in Java ME Embedded.

Lambda expressions, the most important feature of Java 8, are tightly integrated into the entire Java platform. In this presentation, you learn how lambda expressions can be leveraged in the Java ME embedded.

Monday Sep 29, 2014

JavaOne 2014: Lambda Expressions, Streams, and JDK 8 Enhancements to Collections

The following JavaOne presentations, scheduled for Monday, September 29, discuss lambda expressions, streams, and JDK 8 enhancements to collections:

For more information about these topics, see the following sections in the Java Tutorials:

Tuesday Mar 25, 2014

Learn More About Lambda Expressions

Java SE 8 introduced Lambda Expressions, a powerful new behavior abstraction feature that enables code to be passed around as data. Lambda expressions make your code easier to read, easier to maintain, and less prone to error. Lambda expressions make it possible to express a problem with a higher level of abstraction than was previously possible. Use Lambda Expressions to eliminate large chunks of "boilerplate" code (such as when using inner classes to express behavior), and accomplish more work in less lines of code.

For more information about Lambda Expressions, see the following resources:

See What's New in JDK 8 for information about other new features in JDK 8.

Learn More About New Features in Java SE 8

Java SE 8 introduces significant enhancements to the Java language and class libraries. These enhancements enable you to make code more concise without losing readability; write more reliable code; better utilize multi-core and multi-processor systems (code is no longer inherently serial or parallel); and detect more errors at compile time, rather than at run time.

See What's New in JDK 8 and JDK 8 Adoption Guide for more detailed information on these new features and how to adopt them.

Learn more about these features with the following links from Java SE 8 Technical Documentation:

  • Java Language Enhancements
    • Lambda Expressions enable you to treat functionality as a method argument, or code as data. They are similar to closures and provide more concise anonymous function types and a more functional style of programming.
    • Default Methods (or Extension Methods) provide a mechanism to add new methods to existing interfaces.
    • Type Annotations provide the ability to apply an annotation anywhere a type is used, not just on a declaration.
    • Improved Type Inference enables the Java compiler to takes advantage of target typing to infer the type parameters of a generic method invocation. The target type of an expression is the data type that the Java compiler expects depending on where the expression appears.
    • Obtaining Names of Method Parameters shows you how to retrieve parameter names of methods and constructors (not just types and return types) by reflection.
  • Core Libraries Enhancements
  • Java Virtual Machine Enhancements
    • Nashorn is a lightweight, high-performance JavaScript engine, which is integrated into the JRE.
    • java command lists deprecated and removed options as a result of the retirement of rarely used garbage collection combinations and the removal of permanent generation

Simon Ritter has presented the screencast New Features in Java SE 8: A Developer's Guide during the Java 8 Launch Webcast, which discusses these features.

Download JDK 8 today and try it out!

Monday Mar 24, 2014

Learn More About Streams and Collections

Lambda Expressions are a major new language feature introduced in Java SE 8. Related to that change are the Streams API and Aggregate Operations on Collections. The Collection interface now exposes methods Stream<E> stream() and Stream<E> parallelStream(), for obtaining sequential or parallel streams from an underlying collection.

Here's a quick example showing how this new API (with Lambda Expressions) would be used in place of a traditional Iterator or for loop. It obtains a stream from the underlying collection, selects only red objects, then prints out the name of each object that was matched:
.filter(e -> e.getColor() == Color.RED)
.forEach(e -> System.out.println(e.getName()));

Likewise, you could easily request a parallel stream, which might make sense if the collection is large enough and your computer has enough cores:

.filter(e -> e.getColor() == Color.RED)
.forEach(e -> System.out.println(e.getName()));

Using streams enables your code focus on "what" to do (instead of "how" to do it), leaving the library free to use whatever techniques it deems most appropriate (laziness, out-of-order execution, parallelism, etc.).

For more information on Lambda Expressions and Aggregate Operations, see the following resources:

See What's New in JDK 8 for information about other new features in JDK 8.

Wednesday Sep 25, 2013

JavaOne 2013: Lambda Expressions

Many conferences and hands-on lab sessions at JavaOne 2013 today feature lambda expressions, such as the following:

For more information about lambda expressions, see the following sections in the Java Tutorials:

Preview the Streams API in the package in the JDK 8 Early Access documentation.

Tuesday Sep 24, 2013

JavaOne 2013: Lambda: A Peek Under the Hood

Today, Java Language Architect Brian Goetz will give a presentation entitled "Lambda: A Peek Under the Hood." Lambda expressions (closures) and default methods are major additions to JDK 8, enabling new expressive opportunities for applications and libraries. This advanced session looks "under the hood" to explore how lambda expressions are implemented in JDK 8. See Lambda Expressions in the Java Tutorial for an introduction to these new language features.

Monday Sep 23, 2013

JavaOne 2013: Jump-starting Lambda Programming and The Road to Lambda

At JavaOne 2013, Stuart Marks presented the conference " Jump-starting Lambda Programming," and Paul Sandoz and Brian Goetz presented the conference "The Road to Lambda."

To learn more about lambda, see Lambda Expressions in the Java Tutorials. The conference "Jump-starting Lambda Programming" discusses the new Stream library; see the lesson Bulk Data Operations to learn more about this library. The conference "The Road to Lambda" discusses the new parallel stream libraries; see the section Parallelism for more information.


Blog about Java technology documentation and news about Java releases.


« July 2016