Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Java 11
Mastering Java 11

Mastering Java 11: Develop modular and secure Java applications using concurrency and advanced JDK libraries , Second Edition

Arrow left icon
Profile Icon Dr. Edward Lavieri Jr. Profile Icon Jog
Arrow right icon
€36.99
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (2 Ratings)
Paperback Sep 2018 462 pages 2nd Edition
eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Dr. Edward Lavieri Jr. Profile Icon Jog
Arrow right icon
€36.99
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1 (2 Ratings)
Paperback Sep 2018 462 pages 2nd Edition
eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Mastering Java 11

Discovering Java 11

In the previous chapter, we explored the newly-implemented time-based versioning system for the Java platform. We also learned, at a high-level, the changes introduced in Java 9, 10, and 11, also referred to as versions 9, 18.3, and 18.9 respectively. Java 9's most significant change was the introduction of modularity based on Project Jigsaw and included additional changes focusing on the Java Shell, controlling external process, garbage collection, JHM, and more. Key features of Java 10 were covered, including local variable type inference, JDK consolidation, garbage collection, application class-data sharing (CDS), root certificates, and more. Changes introduced in Java 11 included dynamic class-file constants, garbage collection, local variable type inference for Lambdas and more.

In this chapter, we will look at several internal changes introduced...

Technical requirements

This chapter and subsequent chapters feature Java 11. The Standard Edition (SE) of the Java platform can be downloaded from Oracle's official download site at the link (http://www.oracle.com/technetwork/java/javase/downloads/index.html).

An Integrated Development Environment (IDE) software package is sufficient. IntelliJ IDEA, from JetBrains, was used for all coding associated with this chapter and subsequent chapters. The Community version of IntelliJ IDEA can be downloaded from the website (https://www.jetbrains.com/idea/features/).

This chapter's source code is available at GitHub at the URL (https://github.com/PacktPublishing/Mastering-Java-11-Second-Edition).

Improved contended locking

The JVM uses heap space for classes and objects. The JVM allocates memory on the heap whenever we create an object. This helps facilitate Java's garbage collection, which releases memory previously used to hold objects that no longer have a memory reference. Java stack memory is a bit different and is usually much smaller than heap memory.

The JVM does a good job of managing data areas that are shared by multiple threads. It associates a monitor with every object and class; these monitors have locks that are controlled by a single thread at any one time. These locks, controlled by the JVM, are, in essence, giving the controlling thread the object's monitor. So, what contends locking? When a thread is in a queue for a currently locked object, it is said to be in contention for that lock. The following diagram shows a high-level view of this...

Segmented code cache

Java's segmented code cache upgrade was completed and results in faster, more efficient execution time. At the core of this change was the segmentation of the code cache into three distinct segments—non-method, profiled, and non-profiled code.

A code cache is the area of memory where the JVM stores generated native code.

Each of the aforementioned code cache segments will hold a specific type of compiled code. As you can see in the following diagram, the code heap areas are segmented by type of compiled code:

Memory allocation

The code heap containing non-method code is used for JVM internal code and consists of a 3 MB fixed memory block. The rest of the code cache memory is equally allocated...

Smart Java compilation

All Java developers will be familiar with the javac tool for compiling source code to bytecode, which is used by the JVM to run Java programs. Smart Java compilation, also referred to as Smart Javac and sjavac, adds a smart wrapper around the javac process. Perhaps the core improvement added by sjavac is that only the necessary code is recompiled. Necessary code, in this context, is code that has changed since the last compile cycle.

This enhancement might not get developers excited if they only work on small projects. Consider, however, the tremendous gains in efficiency when you continuously have to recompile your code for medium and large projects. The time developers stand to save is reason enough to embrace JEP 199.

How will this change the manner in which you compile your code? It probably won't, at least not yet. Javac will remain the default...

Resolving lint and doclint warnings

Lint and doclint are sources that report warnings to javac. Let's take a look at each one:

  • Lint analyzes bytecode and source code for javac. The goal of lint is to identify security vulnerabilities in the code being analyzed. Lint can also provide insights into scalability and thread locking concerns. There is more to lint and the overall purpose is to save developers time.
You can read more about lint here:
http://openjdk.java.net/jeps/212
  • Doclint is similar to lint and is specific to javadoc. Both lint and doclint report errors and warnings during the compile process. Resolution of these warnings was the focus of JEP 212. When using core libraries, there should not be any warnings. This mindset led to JEP 212, which has been resolved and implemented in Java 9.
A comprehensive list of the lint and doclint warnings can be reviewed...

Tiered attribution for Javac

Javac's type-checking has been streamlined. Let's first review how type-checking works in Java 8; then we will explore the changes in the modern Java platform.

In Java 8, type-checking of poly expressions is handled by a speculative attribution tool.

Speculative attribution is a method of type-checking as part of javac's compilation process. It has a significant processing overhead.

Using the speculative attribution approach to type-checking is accurate, but lacks efficiency. These checks include argument position and are exponentially slower when testing in the midst of recursion, polymorphism, nested loops, and Lambda expressions. So, the update was intended to change the type-checking schema to create faster results. The results themselves were not inaccurate with speculative attribution; they were just not generated rapidly.

The...

Annotations pipeline 2.0

Java annotations refer to a special kind of metadata that resides inside your Java source code files. They are not stripped by javac so that they can remain available to the JVM at runtime.

Annotations look similar to JavaDocs references because they start with the @ symbol. There are three types of annotations. Let's examine each of these as follows:

  • The most basic form of annotation is a marker annotation. These are standalone annotations, with the only component being the name of the animation. Here is an example:
@thisIsAMarkerAnnotation
public double computeSometing(double x, double y) {
// do something and return a double
}
  • The second type of annotation is one that contains a single value, or piece of data. As you can see in the following code, the annotation, which starts with the @ symbol, is followed by parentheses containing data...

New version-string scheme

Prior to Java 9, the release numbers did not follow industry standard versioning—semantic versioning. For example, the last four JDK 8 releases were as follows:

  • Java SE 8 Update 144
  • Java SE 8 Update 151
  • Java SE 8 Update 152
  • Java SE 8 Update 161
  • Java SE 8 Update 162

Semantic versioning uses a major, minor, patch (0.0.0) schema as follows:

  • Major equates to new API changes that are not backward compatible
  • Minor is when functionality is added that is backward compatible
  • Patch refers to bug fixes or minor changes that are backward compatible

Oracle has embraced semantic versioning starting with Java 9 and beyond. For Java, a major-minor-security schema will be used for the first three elements of Java version numbers:

  • Major: A major release consisting of a significant new set of features
  • Minor: Revisions and bug fixes that are backward compatible...

Generating runtime compiler tests automatically

Java is arguably the most commonly used programming language and resides on an increasingly diverse number of platforms. This exacerbates the problem of running targeted compiler tests in an efficient manner. The new Java platform includes a tool that automates the runtime compiler tests.

This new tool starts by generating a random set of Java source code and/or bytecode. The generated code will have three key characteristics:

  • It will be syntactically correct
  • It will be semantically correct
  • It will use a random seed that permits reusing the same randomly generated code

The source code that is randomly generated will be saved in the following directory:

hotspot/test/testlibrary/jit-tester

These test cases will be stored for later reuse. They can be run from the j-treg directory or from the tool's makefile. One of the benefits...

Testing class-file attributes generated by Javac

The lack of, or insufficient, capability to create tests for class-file attributes was the impetus behind the effort to ensure javac creates a class-file's attributes completely and correctly. This suggests that even if some attributes are not used by the class-file, all class-files should be generated with a complete set of attributes. There also needs to be a way of testing that the class-files were created correctly, in regards to the file's attributes.

Prior to Java 9, there was no method of testing a class-file's attributes. Running a class and testing the code for anticipated or expected results were the most commonly used method of testing javac generated class-files. This technique falls short of testing to validate the file's attributes.

There are three categories of class-file attributes—attributes...

Storing interned strings in class-data sharing archives

In Java 5 through Java 8, the method in which strings were stored and accessed to and from CDS archives was inefficient, excessively time-consuming, and wasted memory. The following diagram illustrates the method by which Java stored interned strings in a CDS archive prior to Java 9:

The inefficiency stemmed from the storage schema. This was especially evident when the CDS tool dumped the classes into the shared archive file. The constant pools containing CONSTANT_String items have a UTF-8 string representation.

UTF-8 is an 8-bit variable-length character encoding standard.

The problem

With the use of UTF-8 prior to Java 9, the strings had to be converted to string...

Preparing JavaFX UI controls and Cascading Style Sheet APIs for modularization

JavaFX is a set of packages that permit the design and development of media-rich graphical user interfaces. JavaFX applications provide developers with a great API for creating a consistent interface for applications. Cascading Style Sheets (CSS) can be used to customize the interfaces. One of the great things about JavaFX is that the tasks of programming and interface design can easily be separated.

JavaFX overview

JavaFX contains a wonderful visual scripting tool called Scene Builder, which allows you to create graphical user interfaces by using drag-and-drop and property settings. Scene Builder generates the necessary FXML files that are used...

Compact strings

The string data type is an important part of nearly every Java app. Prior to Java 9, string data was stored as an array of chars. This required 16 bits for each char. It was determined that the majority of string objects could be stored with only 8 bits, or 1 byte of storage. This is due to the fact that most strings consist of Latin-1 characters.

The Latin-1 characters refers to the Latin-1 character set established by the International Organization for Standardization. The character set consists of a single byte set of character's encodings.

Starting with Java 9, strings are now internally represented using a byte array, along with a flag field for encoding references.

Merging selected Xerces 2.11.0 updates into JAXP

Xerces is a library used for parsing XML in Java. It was updated to 2.11.0 in late 2010, and JAXP was updated to incorporate changes in Xerces 2.11.0.

JAXP is Java's API for XML processing.

Prior to Java 9, the JDK's latest update regarding XML processing was based on Xerces 2.7.1. There were some additional changes to JDK 7 based on Xerces, 2.10.0. Java now has a further refinement of the JAXP based on Xerces 2.11.0.

Xerces 2.11.0 supports the following standards:

  • XML 1.0, Fourth Edition
  • Namespaces in XML 1.0, Second Edition
  • XML 1.1, Second Edition
  • Namespaces in XML 1.1, Second Edition
  • XML Inclusions 1.0, Second Edition
  • Document Object Model (DOM):
  • Level 3:
    • Core
    • Load and save
  • Level 2:
    • Core
    • Events
  • Traversal and Range
  • Element Traversal, First Edition
  • Simple API for XML 2.0.2
  • Java APIs for XML Processing (JAXP...

Updating JavaFX/Media to the newer version of GStreamer

JavaFX is used for creating desktop and web applications. JavaFX was created to replace Swing as Java's standard GUI library. The Media class, javafx.scene.media.Media, is used to instantiate an object representing a media resource. JavaFX/Media refers to the following class:

public final class Media extends java.lang.Object

This class provides referential data to a media resource. The javafx.scene.media package provides developers with the ability to incorporate media into their JavaFX applications. JavaFX/Media utilizes a GStreamer pipeline.

GStreamer is a multimedia processing framework that can be used to build systems that take in media from several different formats and, after processing, export them in selected formats.

The update to the modern Java platform ensures JavaFX/Media was updated to include the...

HarfBuzz font-layout engine

Prior to Java 9, the layout engine was used to handle font complexities, specifically fonts that have rendering behaviors beyond what the common Latin fonts have. Java used the uniform client interface, also referred to as ICU, as the de facto text rendering tool. The ICU layout engine has been depreciated and, in Java 9, has been replaced with the HarfBuzz font layout engine.

HarfBuzz is an OpenType text rendering engine. This type of layout engine has the characteristic of providing script-aware code to help ensure text is laid out as desired.

OpenType is an HTML formatted font format specification.

The impetus for the change from the ICU layout engine to the HarfBuzz font layout engine was IBM's decision to cease supporting the ICU layout engine. Therefore, the JDK was updated to contain the HarfBuzz font layout engine.

...

HiDPI graphics on Windows and Linux

A concerted effort was made to ensure the crispness of on-screen components relative to the pixel density of the display. The following terms are relevant to this effort and are provided along with the accompanying listed descriptive information:

  • DPI-aware application: An application that is able to detect and scale images for the display's specific pixel density.
  • DPI-unaware application: An application that makes no attempt to detect and scale images for the display's specific pixel density.
  • HiDPI graphics: High dots-per-inch graphics.
  • Retina display: This term was created by Apple to refer to displays with a pixel density of at least 300 pixels per inch. Displaying graphics, both images, and graphical user interface components, to the user is typically of paramount performance. Displaying this imagery in high quality can be somewhat...

Marlin graphics renderer

The Pisces graphics rasterizer has been replaced with the Marlin graphics renderer in the Java 2D API. This API is used to draw 2D graphics and animations.

The goal was to replace Pisces with a rasterizer/renderer that was much more efficient and without any quality loss. This goal was realized in Java 9. An intended collateral benefit was to include a developer-accessible API. Previously, the means of interfacing with the AWT and Java 2D was internal.

Unicode 8.0.0

Unicode 8.0.0 was released on June 17, 2015. Java's relevant APIs were updated to support Unicode 8.0.0.

New in Unicode 8.0.0

Unicode 8.0.0 added nearly 8,000 characters. Here are the highlights of the release:

  • Ahom script for the Tai Ahom language (India)
  • Arwi, Tamil language (Arabic)
  • Cherokee symbols
  • CJK unified ideographs
  • Emoji symbols along with flesh-tone symbol modifiers
  • Georgian Lari currency symbol
  • lk language (Uganda)
  • Kulango language (Cote d'Ivoire)

Updated classes in Java 9

In order to fully comply with the new Unicode standard, several...

Reserved stack areas for critical sections

Problems stemming from stack overflows during the execution of critical sections have been mitigated. This mitigation takes the form of reserving additional thread stack space.

The pre-Java 9 situation

The JVM throws StackOverflowError when it is asked to perform data computation in a thread that has insufficient stack space and does not have permission to allocate additional space. This is an asynchronous exception. The JVM can also throw the StackOverflowError exception synchronously when a method is invoked.

When a method is invoked, an internal process is used to report the stack overflow. While the current schema works sufficiently for reporting the error, there is no room for...

Dynamic linking of language-defined object models

Java interoperability has been enhanced. The necessary JDK changes were made to permit runtime linkers from multiple languages to coexist in a single JVM instance. This change applies to high-level operations, as you would expect. An example of a relevant high-level operation is the reading or writing of a property with elements such as accessors and mutators.

The high-level operations apply to objects of unknown types. They can be invoked with INVOKEDYNAMIC instructions. Here is an example of calling an object's property when the object's type is unknown at compile time:

INVOKEDYNAMIC "dyn:getProp:age"

Proof of concept

Nashorn is a lightweight, high-performance...

Additional tests for humongous objects in G1

One of the long-favored features of the Java platform is the behind-the-scenes garbage collection. An improvement goal was to create additional WhiteBox tests for humongous objects as a feature of the G1 garbage collector.

WhiteBox testing is an API used to query JVM internals. The WhiteBox testing API was introduced in Java 7 and upgraded in Java 8 and Java 9.

The G1 garbage collector worked extremely well, but there was room for some improved efficiency. The way the G1 garbage collector worked was based on first dividing the heap into regions of equal size, illustrated as follows:

The problem with the G1 garbage collector was how humongous objects were handled.

A humongous object, in the context of garbage collection, is any object that takes up more than one region on the heap.

The problem with humongous objects was that if they...

Improving test-failure troubleshooting

Additional functionality has been added in Java to automatically collect information to support troubleshooting test failures as well as timeouts. Collecting readily available diagnostic information during tests stands to provide developers and engineers with greater fidelity in their logs and other output.

There are two basic types of information in the context of testing:

  • Environmental
  • Process

Each type of information is described in the following section.

Environmental information

When running tests, the testing environment information can be important for troubleshooting efforts. This information includes the following:

  • CPU loads
  • Disk space
  • I/O loads
  • Memory space
  • Open files
  • Open...

Optimizing string concatenation

Prior to Java 9, string concatenation was translated by javac into StringBuilder : : append chains. This was a suboptimal translation methodology, often requiring StringBuilder presizing.

The enhancement changed the string concatenation bytecode sequence, generated by javac, so that it uses INVOKEDYNAMIC calls. The purpose of the enhancement was to increase optimization and to support future optimizations without the need to reformat the javac's bytecode.

See JEP 276 for more information on INVOKEDYNAMIC.

The use of INVOKEDYAMIC calls to java.lang.invoke.StringConcatFactory allows us to use a methodology similar to Lambda expressions, instead of using StringBuilder's stepwise process. This results in more efficient processing of string concatenation.

HotSpot C++ unit-test framework

HotSpot is the name of the JVM. This Java enhancement was intended to support the development of C++ unit tests for the JVM. Here is a partial, non-prioritized, list of goals for this enhancement:

  • Command line testing
  • Creating appropriate documentation
  • Debugging compile targets
  • Framework elasticity
  • IDE support
  • Individual and isolated unit testing
  • Individualized test results
  • Integrating with existing infrastructure
  • Internal test support
  • Positive and negative testing
  • Short execution time testing
  • Supporting all JDK 9 build platforms
  • Test compile targets
  • Test exclusion
  • Test grouping
  • Testing that requires the JVM to be initialized
  • Tests co-located with source code
  • Tests for platform-dependent code
  • Writing and executing unit testing (for classes and methods)

This enhancement is evidence of the increasing extensibility.

...

Enabling GTK3 on Linux

GTK+, formally known as the GIMP toolbox, is a cross-platform tool used for creating graphical user interfaces. The tool consists of widgets accessible through its API. Java's enhancement ensures GTK 2 and GTK 3 are supported on Linux when developing Java applications with graphical components. The implementation supports Java apps that employ JavaFX, AWT, and Swing.

We can create Java graphical applications with JavaFX, AWT, and Swing. Here is a table summarizing those three approaches as they relate to GTK, prior to Java 9:

Approach Remarks
JavaFX
  • Uses a dynamic GTK function lookup
  • Interacts with AWT and Swing via JFXPanel
  • Uses AWT printing functionality
AWT
  • Uses a dynamic GTK function lookup
Swing
  • Uses a dynamic GTK function lookup

So, what changes were necessary to implement this enhancement? For JavaFX, three specific...

New HotSpot build system

The Java platform used, prior to Java 9-11, was a build system riddled with duplicate code, redundancies, and other inefficiencies. The build system has been reworked for the modern Java platform based on the build-infra framework. In this context, infra is short for infrastructure. The overarching goal of this enhancement was to upgrade the build system to one that was simplified.

Specific goals included:

  • Leveraging the existing build system
  • Creating maintainable code
  • Minimizing duplicate code
  • Simplification
  • Supporting future enhancements
You can learn more about Oracle's infrastructure framework at the following link http://www.oracle.com/technetwork/oem/frmwrk-infra-496656.html.

Consolidating the JDF forest into a single repository

The Java 9 platform consisted of eight distinct repositories, as depicted in the following diagram. In Java 10, all of these repositories were combined into a single repository:

Repository consolidation helps streamline development. Moreover, it increases the ease of maintaining and updating the Java platform.

Summary

In this chapter, we covered some impressive new features of the Java platform introduced with Java 9, 10, and 11. We focused on javac, JDK libraries, and various test suites. Memory management improvements, including heap space efficiencies, memory allocation, and improved garbage collection represent a powerful new set of Java platform enhancements. Changes regarding the compilation process that result in greater efficiencies were part of our chapter. We also covered important improvements, such as with the compilation process, type testing, annotations, and automated runtime compiler tests.

In the next chapter, we will look at several minor language enhancements introduced in Java 9, 10, and 11.

Questions

  1. What is contented locking?
  2. What is a code cache?
  3. What is the command-line code used to define the code heap size for the profiled compiled methods?
  4. What are lint and doclint in the context of warnings?
  5. What is the directory used when auto-generating run-time compiler tests?
  6. What flag is used with the -Xshare command-line option for CDS class determination?
  7. What is the file name extension generated by Scene Builder?
  8. Prior to Java 9, how was string data stored?
  9. Starting with Java 9, how is string data stored?
  10. What is OpenType?

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore the latest features in Java 9, Java 10, and Java 11
  • Enhance your Java application development and migration approaches
  • Full coverage of modular Java applications, G1 Garbage Collector, JMH

Description

Java 11 is a long-term release and its new features add to the richness of the language. It emphasizes variable-type inference, performance improvements, along with simplified multithreading. The Java platform has a special emphasis on modularity, making this the programming platform of choice for millions of developers. The modern Java platform can be used to build robust software applications, including enterprise-level and mobile applications. Fully updated for Java 11, this book stands to help any Java developer enjoy the richness of the Java programming language. Mastering Java 11 is your one-stop guide to fully understanding recent Java platform updates. It contains detailed explanations of the recent features introduced in Java 9, Java 10, and Java 11 along with obtaining practical guidance on how to apply the new features. As you make your way through the chapters, you'll discover further information on the developments of the Java platform and learn about the changes introduced by the variable handles and Project Coin, along with several enhancements in relation to import statements processing. In the concluding chapters, you'll learn to improve your development productivity, making your applications more efficient. You'll also be able to get to grips with the command-line flags with respect to various utilities and the command-line utility changes featured in the current Java platform. By the end of the book, you'll have obtained an advanced level understanding of the Java platform and its recent changes.

Who is this book for?

Mastering Java 11 is for experienced Java developers with a solid understanding of the Java language and want to progress to an advanced level.

What you will learn

  • Write modular Java applications
  • Migrate existing Java applications to modular ones
  • Understand how the default G1 garbage collector works
  • Leverage the possibilities provided by the newly introduced Java Shell
  • Performance test your application effectively with the JVM harness
  • Learn how Java supports the HTTP 2.0 standard
  • Find out how to use the new Process API
  • Explore the additional enhancements and features of Java 9, 10, and 11
Estimated delivery fee Deliver to Slovakia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 27, 2018
Length: 462 pages
Edition : 2nd
Language : English
ISBN-13 : 9781789137613
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Slovakia

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Sep 27, 2018
Length: 462 pages
Edition : 2nd
Language : English
ISBN-13 : 9781789137613
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 115.97
Java Projects
€36.99
Mastering Java 11
€36.99
Java 11 Cookbook
€41.99
Total 115.97 Stars icon
Banner background image

Table of Contents

19 Chapters
The Java 11 Landscape Chevron down icon Chevron up icon
Discovering Java 11 Chevron down icon Chevron up icon
Java 11 Fundamentals Chevron down icon Chevron up icon
Building Modular Applications with Java 11 Chevron down icon Chevron up icon
Migrating Applications to Java 11 Chevron down icon Chevron up icon
Experimenting with the Java Shell Chevron down icon Chevron up icon
Leveraging the Default G1 Garbage Collector Chevron down icon Chevron up icon
Microbenchmarking Applications with JMH Chevron down icon Chevron up icon
Making Use of the Process API Chevron down icon Chevron up icon
Fine-Grained Stack Tracing Chevron down icon Chevron up icon
New Tools and Tool Enhancements Chevron down icon Chevron up icon
Concurrency Enhancements Chevron down icon Chevron up icon
Security Enhancements Chevron down icon Chevron up icon
Command-Line Flags Chevron down icon Chevron up icon
Additional Enhancements to the Java Platform Chevron down icon Chevron up icon
Future Directions Chevron down icon Chevron up icon
Contributing to the Java Platform Chevron down icon Chevron up icon
Assessment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
(2 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 100%
netra May 18, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Oracle Jdk 11 release better than this book.
Amazon Verified review Amazon
RahulAgrawal May 25, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Content is not good. Read online before buying.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela