Intermediate/Advanced Java 8

Intermediate/Advanced Java 8

Course Length:
Delivery Methods:
Course Topics
  • Solidify Java foundational knowledge, including the important contracts of class Object
  • Understand the uses and consequences of inheritance and composition, and reinforce the role of interfaces
  • Reinforce fundamental OO principles such as cohesion, coupling, and polymorphism
  • Use the JUnit testing framework and become fluent in writing assertions to verify correct program behavior
  • Familiarity with UML modeling in class diagrams and sequence diagrams
  • Use advanced techniques for object creation, including factories and singletons
  • Use established design patterns for object composition, including Strategy, Decorator, and Facade
  • Write and use generic classes and methods
  • Learn the use cases for inner classes and refactor existing code to use them when appropriate
  • Create and use custom annotations
  • Be familiar with reflection and how to use it
  • Understand the role of functional interfaces introduced in Java 8
  • Understand lambda expressions and method references, and use them to pass behavior (methods)
  • Use the Stream API to perform complex processing of collections and other input sources
  • Learn the new Date/Time API and use it to solve date-oriented business problems
  • Use Javadoc to write professional-grade API comments for your classes
  • Understand build tools such as Ant and Maven, and how to manage application dependencies
  • Write appropriate log statements in your code and configure logging with Log4j
Course Overview

This Intermediate/Advanced Java 8 training class This is a fast-paced course suitable for developers with some previous experience in working with Java and Object-Oriented (OO) programming can be delivered to developers experienced in other OO languages (Python, C++, C#) but with limited Java exposure as well as used as an advanced Java course for more experienced developers. There are numerous optional parts allowing you to tailor the coverage to your group.

It includes an accelerated, yet thorough hands-on review of Java foundational concepts, with attention given to OO design and implementation principles. It then moves on to comprehensive coverage of more advanced topics in Java and OO development to provide participants with a strong grounding to use Java in a sophisticated and productive manner.

This course covers far more than an introductory course, including important topics such as UML and Design Patterns, and using composition vs. inheritance, which are all key to creating well-structured OO systems. After these important areas, it moves on to advanced Java topics such as inner classes, reflection, writing generic classes, and functional programming with lambdas and streams. It teaches a number of useful techniques that enhance productivity and good system design - which may otherwise take Java developers years to absorb on their own. The course concludes with build tools and logging.

Unit testing is stressed throughout the course, with most labs implemented as JUnit tests.

Although the course is designed to be delivered in its entirety, it can be customized to fit your needs. Be prepared to work hard and learn a great deal!

All labs are done with the Eclipse IDE Java EE version, and the lab instructions include detailed directions for using it.

Course Outline
  1. Review - Basics
    1. Java Environment
    2. Classes and Objects
      1. Instance Variables, Methods, Constructors, Static Members
      2. OO Principles: Data Encapsulation, Cohesion
      3. Object Contracts: toString(), equals() and hashCode(), Comparable and Comparator
    3. Packages, Enums, Arrays
    4. Exceptions
  2. Review (Inheritance and Interfaces)
    1. UML Overview
    2. Inheritance
      1. Definition and IS-A Relationship
      2. Method Overriding, @Override
      3. OO Principles: Principle of Substitutability, Polymorphism and Encapsulation of Type, Coupling, Open-Closed Principle
      4. Constructor Chaining
    3. Interfaces
      1. Defining and Implementing, Interface Types
      2. Interface Inheritance
    4. New Interface Features in Java 8
      1. Default Methods, Static Methods
      2. Functional Interfaces
    5. Guidelines
  3. JUnit
    1. Overview
    2. Tests, Assertions, and Fixtures
      1. Writing and Running Tests
      2. Assertions
      3. Test Fixtures, @Before and @After, @BeforeClass and @AfterClass
      4. Testing for Exceptions
    3. Best Practices and Test-Driven Development Overview (TDD)
  4. Collections and Generics
    1. Collections Overview
      1. Generics and Type-Safe Collections
      2. Diamond Operator
    2. Lists, Sets, and Maps
      1. Interfaces and Contracts
      2. Iteration and Autoboxing
      3. Utility Classes - Collections and Arrays
    3. Writing Generic Classes
      1. Inheritance with Generic Types
      2. Wildcard Parameter Types
      3. Type Erasure
  5. Techniques of Object Creatiom
    1. Design Patterns Overview
    2. Controlling Object Creation
      1. Limitations of new Operator, Alternative Techniques
    3. Singleton Pattern
    4. Simple Factory
    5. Factory Method Pattern
    6. Other Techniques
      1. Named Objects, JNDI
      2. Dependency Injection Frameworks
  6. Using Composition and Inheritance Effectively
    1. Inheritance and Composition - Pros and Cons
      1. Composition and Delegation
      2. HAS-A, USES Relationships
    2. Strategy Pattern
    3. Decorator Pattern
    4. Facade and Other Patterns
      1. Facade, Proxy, Template Method
  7. Inner Classes
    1. Overview and Motivation
      1. Stronger Encapsulation, Rules and Caveats
      2. Defining and Using Inner Classes
      3. Member-Level, Method-Local, Anonymous Classes
    2. Static Nested Classes
      1. Nested Classes, Nested Interfaces, Nested Enums
  8. Annotations
    1. Overview
    2. Using Annotations
      1. Target and Retention Policy
      2. Annotation Parameters, Parameter Shortcuts
    3. Writing Custom Annotations
      1. Syntax, Using the Meta-Annotations
      2. Using a Custom Annotation
  9. Reflection
    1. Overview and API
      1. The Class Called Class
      2. Obtaining and Inspecting Class Objects
    2. Working with Objects Reflectively
      1. Creating Instances, Invoking Methods, Setting Field Values
  10. Session 10: Lambda Expressions
    1. Overview
      1. Functional Interfaces and Lambdas
      2. Target Context
    2. Using Lambda Expressions
      1. Syntax, Lambda Compatibility
      2. Variable Capture
      3. Type Inference
    3. Method References
      1. Three Types of Method References
      2. Refactoring Lambdas into Method References
  11. Streams
    1. Overview
      1. Streams vs. Collections
      2. Anatomy of a Stream
    2. Understanding the Stream API
      1. Intermediate Operations and Stream Pipeline
      2. Java 8 Functional Interfaces: Predicate, Comparator, Function, Consumer, Supplier
    3. Stream Processing
      1. Filtering, Sorting, Mapping
      2. Terminal Operations
    4. Collectors
      1. Partitioning and Grouping
      2. Reducing and Summarizing
      3. Downstream Reductions
  12. Date/Time API
    1. Overview
    2. Dates, Times, and Instants
      1. Creating, Parsing, and Formatting
      2. Accessing Date and Time Fields
      3. Deriving New Values
      4. Time Zones
    3. Periods and Durations
      1. Intervals of Time: Date-Based and Time-Based
      2. Adding and Subtracting Intervals
  13. Overview of Build Tools (optional)
    1. Javadoc
      1. Generating API Documentation
      2. Doc Comments and Doc Tags
    2. Ant
      1. History and Overview
      2. Buildfiles, Targets, and Tasks
    3. Maven
      1. Maven Concepts: Project, POM, Artifact, Naming, Dependency, Plugin, Repository
      2. Convention over Configuration
      3. Lifecycles and Phases
      4. Plugins and Goals
  14. Logging and Log4j (optional)
    1. Overview
      1. Popular Logging Frameworks
    2. Writing Log Messages
      1. Creating Loggers and Writing Log Messages
      2. Log Levels
    3. Configuration
      1. Appenders and Layouts
      2. Logger Configuration and Logger Hierarchy
Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following is required for this Java Fundamentals class:

  • Existing programming experience
Request a Private Class
  • Private Class for your Team
  • Online or On-location
  • Customizable
  • Expert Instructors
Request Pricing