Blog này chứa những kiến thức mà mình lượm nhặt được

What’s New in Java 8

What’s New

The Java Tutorials are continuously updated to keep up with changes to the Java Platform and to incorporate feedback from our readers. This release of the tutorial coincides with the release of JDK 8. See What’s New in JDK 8 for more information about new features in this release, which includes the following:

Lambda expressions enable you to treat functionality as a method argument, or code as data. Lambda expressions let you express instances of single-method interfaces (referred to as functional interfaces) more compactly.

Default methods are methods in an interface that have an implementation. They enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for older versions of those interfaces.

Aggregate operations enable you to perform functional-style operations on streams of elements, in particular, bulk operations on collections, such as sequential or parallel map-reduce transformations.

Date-Time APIs enable you to represent dates and times and manipulate date and time values. They support the International Organization for Standardization (ISO) calendar system as well as other commonly used global calendars.

Type annotations can be used in conjunction with pluggable type systems for improved type checking, and repeating annotations enable you to apply the same annotation to a declaration or type use.

Apart from fixing typos and errors, this update includes also includes the following:

The Security trail has been restructured; find security information about applets and Java Web Start applications in the Java Applets lesson.

Generics — An enhancement to the type system that supports operations on objects of various types while providing compile-time type safety. Note that this lesson is for advanced users. TheJava Language trail contains a Generics lesson that is suitable for beginners.

Internationalization — An introduction to designing software so that it can be easily adapted (localized) to various languages and regions.