Advanced Java 9
Master the features that define modern Java.
About this course
Master the features that define modern Java. After revisiting language changes since Java 6, you will adopt the Java 9 module system with module descriptors, qualified exports and open modules, experiment in JShell, and use the improved Optional, Process and Stack-Walking APIs. The second half moves on to compact strings, concurrency with locks, executors and atomic variables, reflection and reference objects.
Curriculum
- Overview of 'smaller' Java 9 topics
- Java versioning
- The JDK/JRE file structure
- Deprecation
- The jdeprscan tool
- Multi-Release JAR Files
- HTML 5 compliant JavaDoc
- Exercise: Creating a MRJar
- Changes made to the language since Java 6
- Multi-catch
- Using effectively final variables in try-with-resources
- Suppressed Exceptions
- Binary literals
- Reserved underscore (Java 9)
- Type inference in anonymous classes (Java 9)
- @SafeVargs (updates in Java 9)
- Default and static methods in interfaces (Java 8)
- Private methods in interfaces (Java 9)
- Exercise: Try-With-Resources
- Problems with Classpath
- Encapsulation and the public access modifier
- Application memory footprint
- Java 8’s compact profile
- Using internal JDK APIs
- Introduce Project Jigsaw
- Classpath and Encapsulation
- The JDK internal APIs
- Java 9 Platform modules
- Defining application modules
- Define module dependencies
- Implicit dependencies
- Implied Readability
- Exporting packages
- Exercise: Defining Modules
- Define module requirements
- Explain qualified exports
- Open modules for reflection
- Use ServiceLoader
- The provides and uses keywords
- Exercise: Modules and the ServiceLoader
- Exercise: Using Reflection on modules
- Being backwards compatible
- The ModulePath and ClassPath
- Unnamed Modules
- Automatic Modules
- The JLink tool
- Exercise: Migrating to modules
- Introduction to JShell
- Running Expressions in JShell
- Importing packages
- Defining methods and types
- Using the JShell editor
- Save and loading state
- Exercise: Working with JShell
- Enhancements on the Optional class
- Improvements made in the Process API
- The Stack-Walking API
- The HTTP2 Client
- The Multi-Resolution API
- Exercise: Working with Native processes
- Exercise: HTTP Clients
- Performance in Java 9
- Compact Strings
- String deduplication
- Ahead-Of-Time Compilation
- Hotspot Diagnostic commands
- The G1 Garbage collector
- Variable and Method Handles
- Principles of Multithreading
- Creating a Threaded Class
- Basic Features of the Thread Class
- Thread Scheduling
- Thread Synchronization
- Exercise: Simple Thread Class
- Exercise: Simple Runnable Class
- Concurrent Locks are Explicit and Flexible
- Executor Interfaces Provide Thread Management
- Challenges for Concurrent Use of Collections
- Concurrent Collections
- Atomic Variables Avoid Synchronization
- Exercise: Working with Concurrent Java
- Exercise: Sleeping Threads
- Exercise: Safe Data Access
- Exercise: Producer/Consumer
- The common thread pool
- Atomic variables
- LongAdder and LongAccumulator
- CompletableFuture
- Non-blocking asynchronous tasks
- Exercise: CompletableFuture
- Reflection classes
- Introspection
- Dynamic invocation of methods
- Using annotations
- Type annotations
- Receiver parameter
- Exercise: Introspection and Reflection
- Exercise: Reflection Server
- List the kinds of object references available in Java
- Introduce Weak, Soft and PhantomReference
- Explain the ReferenceQueue
- Abstraction and Responsibilities
- Low Coupling
- Programming principles
- Inheritance
- Proper use of Exceptions
- Managing state in exceptional situations
- Checked vs. Unchecked Exceptions
- List and describe the two types of benchmarks
- Describe the criteria that should be considered when constructing a benchmark plan
- Name the three most useful targets for profiling
- List four common tools/techniques for profiling
- Describe two strategies for improving performance as a result of profiling data
- List and explain the five most common problem areas for good performance with Java
- Use the JDK to collect runtime profiling data
- Successfully read the profiling data generated by the JDK to detect performance bottlenecks
- Instrument your own code to collect method execution time data
- Exercise: Using the JVM Profiling Tools and Visual VM
- List three potential problems with strings
- List two ways to optimize loops
- Describe the advantages of private and final methods
- List two advantages of collections over vectors and hashtables
- List 4 other code and system optimizations
- Exercise: Code Optimizations
- Debunk several myths of Java performance tuning
- Synchronization trade-offs
- Setting methods to be final
- String is not always bad
- Revisit the fundamentals of Java code performance
- How to detect a performance myth
- List five ways to optimize Java program design
- Exercise: Design Optimizations
Who it's for
Experienced Java developers who want to modernise their code and design with Java 9.
Before you start
- Students should have a strong understanding of Core Java, as well as knowledge of other topics such as: Database management, Basic web technologies, Software development tools, Logical thinking and problem-solving skills, and Java primitives and OOP concepts
Related courses
More in Programming & Web Development →Android Studio Development Essentials
Programming & Web Development
View course →Blockchain: An Overview for Business Professionals
Programming & Web Development
View course →Computer Vision with Python OpenCV
Programming & Web Development
View course →Database Design - Beginner
Programming & Web Development
View course →Flask Development with Python
Programming & Web Development
View course →HTML5 - Content Authoring Fundamentals
Programming & Web Development
View course →Let's plan your next step together.
Tell us the course or certification you have in mind and we'll send the outline, upcoming dates, fees and private-team options.