System, but they may not be reproduced for publication



Yüklə 83 Mb.
Pdf görüntüsü
səhifə3/82
tarix19.04.2023
ölçüsü83 Mb.
#106251
1   2   3   4   5   6   7   8   9   ...   82
Java A Beginner’s Guide, Eighth Edition ( PDFDrive )

product version number.
The next release of Java was called Java SE 6, and Sun once again decided to change
the name of the Java platform. First, notice that the “2” has been dropped. Thus, the
platform now had the name Java SE, and the official product name was Java Platform,
Standard Edition 6, with the development kit being called JDK 6. As with J2SE 5, the 6
in Java SE 6 is the product version number. The internal, developer version number is
1.6.
Java SE 6 built on the base of J2SE 5, adding incremental improvements. Java SE 6
added no major features to the Java language proper, but it did enhance the API
libraries, added several new packages, and offered improvements to the run time. It
also went through several updates during its long (in Java terms) life cycle, with several
upgrades added along the way. In general, Java SE 6 served to further solidify the
advances made by J2SE 5.
The next release of Java was called Java SE 7, with the development kit being called
JDK 7. It has an internal version number of 1.7. Java SE 7 was the first major release of
Java after Sun Microsystems was acquired by Oracle. Java SE 7 added several new
features, including significant additions to the language and the API libraries. Some of
the most important features added by Java SE 7 were those developed as part of Project
Coin. The purpose of Project Coin was to identify a number of small changes to the Java
language that would be incorporated into JDK 7, including

A String can control a switch statement.



Binary integer literals.

Underscores in numeric literals.

An expanded try statement, called try­with­resources, that supports automatic
resource management.

Type inference (via the diamond operator) when constructing a generic instance.

Enhanced exception handling in which two or more exceptions can be caught by a
single catch (multicatch) and better type checking for exceptions that are rethrown.
As you can see, even though the Project Coin features were considered to be small
changes to the language, their benefits were much larger than the qualifier “small”
would suggest. In particular, the try­with­resources statement profoundly affects the
way that a substantial amount of code is written.
The next release of Java was Java SE 8, with the development kit being called JDK 8. It
has an internal version number of 1.8. JDK 8 represented a very significant upgrade to
the Java language because of the inclusion of a far­reaching new language feature: the
lambda expression. The impact of lambda expressions was, and continues to be, quite
profound, changing both the way that programming solutions are conceptualized and
how Java code is written. In the process, lambda expressions can simplify and reduce
the amount of source code needed to create certain constructs. The addition of lambda
expressions also caused a new operator (the –>) and a new syntax element to be added
to the language. In addition to lambda expressions, JDK 8 added many other important
new features. For example, beginning with JDK 8, it is now possible to define a default
implementation for a method specified by an interface. In the final analysis, Java SE 8
was a major release that profoundly expanded the capabilities of the language and
changed the way that Java code is written.
The next release of Java was Java SE 9. The developer’s kit was called JDK 9. With the
release of JDK 9, the internal version number is also 9. JDK 9 represented a major Java
release, incorporating significant enhancements to both the Java language and its
libraries. The primary new feature was modules, which enable you to specify the
relationships and dependencies of the code that comprises an application. Modules also
add another dimension to Java’s access control features. The inclusion of modules
caused a new syntax element, several new keywords, and various tool enhancements to
be added to Java. Modules had a profound effect on the API library because, beginning
with JDK 9, the library packages are now organized into modules.


In addition to modules, JDK 9 included several other new features. One of particular
interest is JShell, which is a tool that supports interactive program experimentation
and learning. (An introduction to JShell is found in 
Appendix D
.) Another interesting
upgrade is support for private interface methods. Their inclusion further enhanced JDK
8’s support for default methods in interfaces. JDK 9 added a search feature to the
javadoc tool and a new tag called @index to support it. As with previous releases,
JDK 9 contains a number of updates and enhancements to Java’s API libraries.
As a general rule, in any Java release, it is the new features that receive the most
attention. However, there is one high­profile aspect of Java that was deprecated by JDK
9: applets. Beginning with JDK 9, applets are no longer recommended for new projects.
As will be explained in greater detail in 
Chapter 1
, because of waning browser support
for applets (and other factors), JDK 9 deprecated the entire applet API.
The next release of Java was Java SE 10 (JDK 10). However, prior to its release, a major
change occurred in the Java release schedule. In the past, major releases were often
separated by two or more years. However, beginning with JDK 10, the time between
releases was significantly shortened. Releases are now expected to occur on a strict
time­based schedule, with the anticipated time between major releases (now called

Yüklə 83 Mb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8   9   ...   82




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə