Course : Java 8: Learning new features through practice

Java 8: Learning new features through practice

Download in PDF format Share this course by email 2

Download in PDF format Share this course by email 2

This course will enable you to understand and practice the new features of Java version 8. You'll learn about lambda expressions and the possibilities offered by functional programming. You'll learn how to get JavaScript code to interact with Java code and discover new APIs.


Inter
In-house
Custom

Practical course in person or remote class

Ref. JVA
Price : 1870 € E.T.
  3d - 21h00




This course will enable you to understand and practice the new features of Java version 8. You'll learn about lambda expressions and the possibilities offered by functional programming. You'll learn how to get JavaScript code to interact with Java code and discover new APIs.

Teaching objectives
At the end of the training, the participant will be able to:
  • Use lambda expressions
  • Make use of the possibilities offered by functional programming.
  • Use JavaScript codes from Java 8
  • Learn the new date and time management API

Intended audience
Java designers, developers, and project managers who want to learn about the new features of Java 8

Prerequisites
Working in Java development, knowledge of Java 5, 6, or 7 and basics of JavaScript.

Course schedule

Overview of what's new in Java 8

  • General view of additions: 195 new entities (classes, interfaces, etc.).
  • Lambda expressions.
  • Writing SQL code in Java 8 code.
  • Default implementations of interfaces and @FunctionalInterface, new annotations.
  • Upgrades to streams.
  • The new date and time management API.
  • Upgrades to the APIs java.lang, java.util, java.net, etc.
  • The ability to run JavaScript code with Java 8 Nashorn.
Hands-on work
Verifying that JDK 8 has been installed (tools, javadoc, etc.).

Lambda expressions

  • Notion of embedded anonymous classes, improvements made by the lambda expression concept.
  • Syntactical aspects (declaration, implementation, passing parameters, range of variables, etc.)
  • The concept of a “functor” through “functional” interfaces and the java.util.function package.
  • Using lambda-expressions to work with collections.
  • Contributions in writing SQ code. Listeners...
Hands-on work
Discovering lambda-expressions.

Advanced functional programming

  • The use of @FunctionalInterface.
  • Functional interfaces provided by JDK 8.
  • Predicate, Function, Supplier, Consumer, etc.
  • References to methods and constructors.
Hands-on work
Implementing advanced aspects

Java 8 Nashorn

  • JavaScript within Java? From Rhino in Java 7 to Oracle Nashorn, the ECMAScript-262 engine of Java 8.
  • Using the jjs command line.
  • Calling JavaScript code from a Java application, either directly or with a separate .js file.
  • Calling Java code from a JavaScript script.
Hands-on work
JavaScript calls from Java.

New Date and Time API

  • The difficulties caused by the Date and GregorianCalendar APIs, the JodaTime alternative, and JSR 310.
  • The concepts of machine time and human time, the basic principles of the new API.
  • Machine time management with java.time.Instant and java.time.Duration.
  • Human time with java.time.LocalDate, java.time.LocalTime, java.time.LocalDateTime.
Hands-on work
Using the new date and time management API.

Other new features

  • The new streams.
  • Map-reduce.
Hands-on work
Implementing new features.