Running on Java 22-ea+27-2262 (Preview)
Home of The JavaSpecialists' Newsletter

Mastering Java 11 Course

The Module System and other features of Java 11

Using Java 11

Duration of 3 Days


Oracle produces a new "feature release" of Java every six month. Teams that do not move forward with this rapid pace, run the risk of having to work with outdated technology, and are often forced to code around shortcomings that have already been solved in more modern Java.

In this course, we teach the most important new features of Java 9, 10, and 11. It is ideal for programmers tho are currently programming Java 8, and who need to upgrade their systems, or even programmers that are using Java 11, but feel that they have not understood all the intricacies of the new version.

We begin with encapsulation improvements, where most of our time is spent on the Java Platform Module System (JPMS). We explore how we can use JPMS to modularize our own applications and libraries. We show how the module-info.java file can give us better encapsulation and cleaner interfaces between modules. We then look at how deprecation is stricter and how we can build jar files that support several versions of Java.

Our next focus is on performance improvements in Java 11, looking at how Strings are enhanced, garbage collection, the Java Flight Recorder, and how we can use the JDK Mission Control to analyze performance bugs.

We then look at a few language improvements, specifically the new "var" construct, and how and when to use it. We then look at several small changes in the language that make coding more convenient.

We then investigate some additions to concurrency, such as how we can use VarHandles to atomically update fields, much like atomic field references worked in the past. We also show how to get the best performance from VarHandles, to match that of sun.misc.Unsafe. Lastly, we look at a few new concurrency improvements.

We end our Java 11 excursion by learning about tools and API improvements, beginning with the collection factory methods to create immutable List, Set and Map instances. We then spend some time learning about HttpClient, and the three modes of communication: synchronous, asynchronous, and reactive. We learn how to launch single-file Java programs without the need to first compile the classes, and how JShell acts as a Java REPL. We also learn about the new unified logging that gives us insight into how the JVM runs. Our last two topics are the new StackWalker API, allowing us to get more information of which methods are in our stack, and the new ObjectInputFilter to make serialization more secure.

During the training, we will always get a chance to try out what we have learned in carefully thought out exercises. This will help us understand and quickly internalize what we have just learned.

Mastering Java 11 Course Enquiry


Prerequisites

This course is ideally suited to the professional Java programmer who knows Java 8 and would like to learn Java 11.

  • Required Experience: At least two years of professional Java programming.

Pricing Options

We have several options for you to join this course:

1. Virtual In-house Course:

Presented via video conference to your team of programmers by the author of the course. Price is €12000 for up to 10 students, above that is an additional €1200 per student.

  • Example 1: Course with 8 students taught remotely via video conference, price is €12000. Price per student is €1500.
  • Example 2: Course with 12 students taught remotely via video conference, price is €14400. Price per student is €1200.
  • Example 3: Course with 24 students taught remotely via video conference, price is €28800. Price per student is €1200.

Please contact us if you have any questions.

2. In-person In-house Course:

Presented at your company in-person by one of our Certified JavaSpecialist Instructors. Price is €17500 for up to 10 students, above that is an additional €1750 per student, plus the travel expenses of the instructor. Note that for in-person in-house courses, we need a minimum of three consecutive training days.

  • Example 1: Course with 8 students taught on-site at your company, price is €17500. Price per student is €2187.
  • Example 2: Course with 12 students taught on-site at your company, price is €21000. Price per student is €1750.
  • Example 3: Course with 18 students taught on-site at your company, price is €31500. Price per student is €1750.

Please contact us if you have any questions.

2. Open Enrollment Classroom Course:

We occasionally offer this course as a classroom course in Chania on the Island of Crete. Price for the course is €3375 per student.

We also offer this course as an open enrollment live remote course that you can attend from anywhere. Price is €2295 per student.

Please contact us if you have would like to make a booking or if you have any questions.

4. Self-Paced Course:

This course is also available as a self-paced course.

Please contact us if you have any questions.

* Prices exclude EU VAT and withholding taxes where applicable. Please contact us for an exact quote for your country.

Open Courses

All our courses are offered as in-house courses. Please contact us on heinz@javaspecialists.eu.

Location Dates Presenter Language Fees

* Price is excluding EU VAT where applicable. Please contact us for an exact quote for your country.

Detailed Outline

Part 1: Encapsulation Improvements
  • JEP 261: Module System
    • Impedence Mismatch between the JVM and us
    • Project Jigsaw history and goals
    • Java Module System Basics
      • Readability, Accessibility, Strong Encapsulation, Use Cases
      • Using no module, single module, multiple modules
    • Beyond the Basics
      • Transitive Dependencies
      • Optional Dependencies
      • Services
      • Qualified Exports
      • Deep Reflective Access
    • Migration Challenges
      • Internal APIs
      • JEE Modules
      • Split Packages
      • Runtime Images
    • Incremental Modularization
      • The Unnamed Module
      • Automatic Modules
      • Modularization Strategies
    • Conclusion
  • JEP 260: Encapsulate Most Internal APIs
    • Included in JEP 261 section
  • JEP 277: Enhanced Deprecation
    • @since, @forRemoval
    • How to consider deprecation in future
  • JEP 238: Multi-Release JAR Files
    • Supporting several Java versions
Part 2: Performance Improvements
  • JEP 254: Compact Strings
    • byte[] replacing char[]
    • Effect on non-LATIN1 Strings
    • Deduplication
    • intern()
  • JEP 280: Indify String Concatenation
    • Fast addition of mixed types in various Java versions
    • invokedynamic and String +
  • JEP 328: Flight Recorder
    • Starting and controlling Java Flight Recorder
    • Creating own events
    • Viewing and analyzing results in JDK Mission Control
  • JEP 248: Make G1 the Default Garbage Collector
    • Overview of garbage collectors: Serial, Throughput, CMS (deprecated), G1, ZGC, Shenandoah
    • Types of issues that we see with GC affecting throughput and latency
    • Logging the garbage collection activity
  • JEP 318: Epsilon: A No-Op Garbage Collector (Experimental)
    • Description of no-op GC
    • Use cases for never collecting
Part 3: Language Improvements
  • JEP 286: Local-Variable Type Inference
    • Type duplication, locality
    • Rules of "var"
    • Style guidelines
      • Choose variable names that provide useful info
      • Minimize the scope of local variables
      • Consider var when the initializer provides sufficient information to the reader
      • Use var to break up chained or nested expressions
      • Don’t worry too much about "programming to the interface"
      • Take care when using var with diamonds or generics
      • Take care when using var with literals
  • JEP 323: Local-Variable Syntax for Lambda Parameters
    • Consistency and annotations
  • JEP 213: Milling Project Coin
    • Private interface methods
    • Effectively final variables to be used with try-with-resource
    • Diamond operator with anonymous types
    • @SafeVarargs
    • Removal of underscore _ as identifier
Part 4: Concurrency Improvements
  • JEP 193: Variable Handles
    • MethodHandles.Lookup
    • MethodHandles.privateLookupIn()
    • Compare-and-swap (CAS) and non-blocking algorithms
    • Best practices
  • JEP 266: More Concurrency Updates
    • Reactive Streams (very) Quick Intro
    • CompletableFuture Enhancements
Part 5: Tools and API Improvements
  • JEP 269: Convenience Factory Methods for Collections
    • List.of(), Set.of(), Map.of()
    • True immutability
    • What about Arrays.asList()?
  • JEP 321: HTTP Client
    • HttpClient, HttpRequest, HttpResponse
    • Creating HttpClient and HttpRequest using builders
    • Asynchronous request returning CompletableFuture
    • Reactive request and response bodies
  • JEP 330: Launch Single-File Source-Code Programs
    • ClassLoader gotchas
  • JEP 158: Unified JVM Logging
    • Tags, levels, output, decorators
    • Configuring logging from jcmd
  • JEP 222: jshell: The Java Shell (Read-Eval-Print Loop)
    • Java REPL
    • Default imports
    • Semicolons
    • Autocompletion
    • Practical uses
  • JEP 259: Stack-Walking API
    • Efficient standard way to walk the call stack
    • Additional information about classes and methods
  • JEP 290: Filter Incoming Serialization Data
    • ALLOWED, REJECTED, UNDECIDED
    • Global filter
    • Filter with String pattern
Conclusion
  • Where to next
  • Java 17 and beyone
  • The Java Specialists' Newsletter

About the Author

Heinz Kabutz Java Conference Speaker

Java Champion, author of the Javaspecialists Newsletter, conference speaking regular... About Heinz

Superpack '23

Superpack '23 Our entire Java Specialists Training in one huge bundle more...

Free Java Book

Dynamic Proxies in Java Book

110% Money-back Guarantee

Should you not be satisfied with the quality of the training or the delivery, we will gladly refund you 100% of the course fees. This needs to be brought to our attention within the first 4 hours of the course and a chance should be given to correct whatever you are not satisfied with. If you are still not satisfied, we will refund you 100% of the course fees, plus we will pay our own travel expenses. The training material then remains the property of JavaSpecialists.EU.


Cancellation Policy

If the course is cancelled more than two weeks before the start of the course, a 10% cancellation fee of the fees will apply, plus any non-refundable travel expenses incurred by the trainer.

If the course is cancelled within two weeks of the start of the course, a 50% cancellation fee of the fees will apply, plus any non-refundable travel expenses incurred by the trainer.

No refund will be given to cancellations during the course.


Java Training

We deliver relevant courses, by top Java developers to produce more resourceful and efficient programmers within their organisations.

Java Consulting

We can help make your Java application run faster and trouble-shoot concurrency and performance bugs...