-
- Introduction
-
Java Syntax and Class Review
- Java Language Review
- Java Class Structure
- Java Naming Conventions
- How to Compile and Run
- Code Blocks
- Primitive Data Types
- Numeric Literals
- Operators
- Logical Operators
- If else Statement
- Switch Statement
- Basic loops
- Arrays and for-each Loop
- Strings
- Strings Operations:StringBuilder
- A Simple Java Class: Employee
- Methods
- Creating an Instance of a Class
- Constructors
- package Statement
- import Statements
- Java Is Pass-By-Value
- Pass-By-Value for Object References
- Objects Passed as Parameters
- Garbage Collection
-
Encapsulation and Subclassing
- Encapsulation
- Encapsulation: Public and Private Access Modifiers
- Encapsulation: Private Data, Public Methods
- Employee Class Refined
- Make Classes as Immutable as Possible
- Method Naming: Best Practices
- Encapsulation: Benefits
- Creating Subclasses
- Subclassing
- Manager Subclass
- Constructors in Subclasses
- Using super
- Constructing a Manager Object
- Overloading Methods
- Overloaded Constructors
- Single Inheritance
-
Overriding Methods, Polymorphism, and Static Overr
- Using Access Control
- Access Control: Good Practice
- Overriding Methods
- Invoking an Overridden Method
- Virtual Method Invocation
- Accessibility of Overriding Methods
- Applying Polymorphism
- Overriding Object methods
- Object toString Method
- Object equals Method
- Overriding equals in Employee
- Overriding Object hashCode
- Methods Using Variable Arguments
- Casting Object References
- Upward Casting Rules
- Downward Casting Rules
- static Keyword
- Static Methods
- Using Static Variables and Methods: Example
- Implementing Static Methods
- Static Variables
- Defining Static Variables
- Using Static Variables
- Static Initializers
- Static Imports
- Design Patterns
- Singleton Pattern
- Immutable Classes
-
Abstract and Nested Classes
- Modelling Business Problems with Classes
- Enabling Generalization
- Enabling Generalization
- Identifying the Need for Abstract Classes
- Defining Abstract Classes
- Defining Abstract Methods
- Validating Abstract Classes
- Final Methods
- Final Classes
- Final Variables
- Declaring Final Variables
- Nested Classes
- Enumerations
- Enum Usage
- Complex Enums
-
Interfaces and Lambda Expressions
- Java Interfaces
- Adding an Interface
- Interface References
- Interface Reference Usefulness
- Interface Code Flexibility
- default Methods in Interfaces
- default Method: Example
- static Methods in Interfaces
- Constant Fields
- Extending Interfaces
- Implementing and Extending
- Anonymous Inner Classes
- Anonymous Inner Class: Example
- String Analysis Regular Class
- String Analysis Regular Test Class
- String Analysis Interface: Example
- String Analyzer Interface Test Class
- Encapsulate the for Loop
- String Analysis Test Class with Helper Method
- String Analysis Anonymous Inner Class
- String Analysis Lambda Expression
- Lambda Expression Defined
- What Is a Lambda Expression?
- Lambda Expression Shorthand
- Lambda Expressions as Variables
-
Generics and Collections
- Topics
- Generics
- Simple Cache Class Without Generics
- Generic Cache Class
- Generics in Action
- Generics with Type Inference Diamond Collections
- Collection Types
- Collection Interfaces and Implementation
- List Interface
- ArrayList
- Autoboxing and Unboxing
- ArrayList Without Generics
- Generic ArrayList
- Generic ArrayList: Iteration and Boxing
- Set Interface
- TreeSet: Implementation of Set
- Map Interface
- Map Types
- TreeMap: Implementation of Map
- Deque Interface
- Ordering Collections
- Comparator Interface
-
Collections, Streams, and Filters
-
Lambda Built-in Functional Interfaces
-
Lambda Operations
- Streams API
- Types of Operations
- Extracting Data with Map
- Taking a Peek
- Search Methods: Overview
- Search Methods
- Optional Class
- Lazy Operations
- Stream Data Methods
- Performing Calculations
- Sorting
- Comparator Updates
- Saving Data from a Stream
- Collectors Class
- Quick Streams with Stream.of
- Flatten Data with flatMap
-
Exceptions and Assertions
- Error Handling
- Exception Handling in Java
- try-catch Statement
- Exception Objects
- Exception Categories
- Handling Exceptions
- finally Clause
- try-with-resources Statement
- Catching Multiple Exceptions
- Declaring Exceptions
- Handling Declared Exceptions
- Throwing Exceptions
- Custom Exceptions
- Assertions
- Assertion Syntax
- Internal Invariants
- Control Flow Invariants
- Class Invariants
- Controlling Runtime Evaluation of Assertions
-
Java Date/Time API
- Why Is Date and Time Important?
- Previous Java Date and Time
- Working with Local Date and Time
- Working with LocalDate
- Working with LocalTime
- Working with LocalDateTime
- Working with Time Zones
- Modelling Time Zones
- Creating ZonedDateTime Objects
- Working with ZonedDateTime Gaps/Overlaps
- ZoneRules
- Working Across Time Zones
- Date and Time Methods
- Date and Time Amounts
- Period
- Duration
- Calculating Between Days
- Making Dates Pretty
- Using Fluent Notation
-
Java I/O Fundamentals
-
Java File I/O (NIO)
- New File I/O API
- Limitations of java.io.File
- File Systems, Paths, Files
- Relative Path Versus Absolute Path
- Java NIO Concepts
- Path Interface
- Path Interface Features
- Removing Redundancies from a Path Creating a Subpath
- Joining Two Paths
- Symbolic Links
- Working with Links
- File Operations
- Checking a File or Directory
- Deleting a File or Directory
- Copying a File or Directory
- Moving a File or Directory
- List the Contents of a Directory
- Walk the Directory Structure
- BufferedReader File Stream
- NIO File Stream
- Read File into ArrayList
- Managing Metadata
- Symbolic Links
-
Concurrency
- Task Scheduling
- Legacy Thread and Runnable
- Extending Thread
- Implementing Runnable
- The java.util.concurrent Package
- Recommended Threading Classes
- Shutting Down an ExecutorService java.util.concurrent.Callable
- java.util.concurrent.Future
- Shared Data
- Problems with Shared Data
- Non-shared Data
- Atomic Operations
- Out-of-Order Execution
- The synchronized Keyword
- synchronized Methods
- synchronized Blocks
- Object Monitor Locking
- Threading Performance
- java.util.concurrent Classes and Packages
- The java.util.concurrent.atomic Package
- java.util.concurrent.CyclicBarrier
- Thread-Safe Collections
-
Parallel Streams
- Streams Review
- Old Style Collection Processing
- New Style Collection Processing
- Stream Pipeline: Another Look
- Styles Compared
- Parallel Stream
- Using Parallel Streams: Collection
- Using Parallel Streams: From a Stream Pipelines Fine Print
- Embrace Statelessness
- Streams Are Deterministic for Most Part Some Are Not Deterministic
- Reduction
- Reduction Fine Print
- A Look Under the Hood
- Illustrating Parallel Execution
- Performance
-
Building Database Applications with JDBC
- Using the JDBC API
- Using a Vendor’s Driver Class
- Key JDBC API Components
- Writing Queries and Getting Results
- Using a ResultSet Object
- CRUD Operations Using JDBC API
- SQLException Class
- Closing JDBC Objects
- try-with-resources Construct
- Using PreparedStatement
- Using PreparedStatement: Setting Parameters
- Executing PreparedStatement
- PreparedStatement:Using a Loop to Set Values
- Using CallableStatement
-
Modularity and Other New Features
- Working with the Module System
- Modular JDK
- Creating Custom Runtime Images
- Multi-release JAR files
- Private Interface Methods
- Enhancements to the Stream API
- var keyword and functional improvements
- Convenience Methods for Collections
- Convenience Methods for Arrays
- Convenience Methods for Files
- Enhanced Deprecations for APIs
- JShell
Prev
Nested Classes
Next
Enum Usage