Overview
Java 8 Programming for Object Oriented Experienced Developers is a five-day, comprehensive hands-on introduction to Java training course geared for developers who have prior working knowledge of object-oriented programming languages such as C# or C++. The course covers best practices for writing great object-oriented programs in Java 8 using appropriate development techniques, new features for improved performance and new capabilities for handling rapid application development. The course also involves discussion on a real-world case study that would also serve as a reference for the participants during the course and after its completion.
What You'll Learn
- Understand not only the fundamentals of the Java language, but also its importance, uses, strengths and weaknesses
- Understand the basics of the Java language and how it relates to OO programming and the Object Model
- Learn to use Java multi-threading and exception handling features
- Understand and use classes, inheritance and polymorphism
- Understand and use collections, generics, autoboxing, and enumerations including new Java features and capabilities
- Become familiar with the concept of functional programming using Lambda Expressions
- Process large amounts of data using the Stream API introduced in Java 8
- Use the JDBC API for database access
- Work with annotations
- Understand and work with the classes in the concurrent package
- Take advantage of the Java tooling that is available with the programming environment being used in the class
Curriculum
- Java Platforms
- Lifecycle of a Java Program
- Responsibilities of JVM
- Documentation and Code Reuse
- Setting Up Environment
- Locating Class Files
- Compiling Package Classes
- Source and Class Files
- Java Applications
- Exercise: Exploring MemoryViewer
- Exercise: Exploring ColorPicker
- Workbench and Workspace
- Views
- Editors
- Perspectives
- Projects
- Tutorial: Working with Eclipse
- Classes in Java
- Class Modifiers and Types
- Class Instance Variables
- Primitives vs. Object References
- Creating Objects
- Exercise: Create a Simple Class
- Passing Parameters into Methods
- Returning a Value from a Method
- Overloaded Methods
- Constructors
- Optimizing Constructor Usage
- Exercise: Create a Class with Methods
- Operators
- Comparison and Logical Operators
- Looping
- Continue and Break Statements
- The switch Statement
- The for-each() Loop
- Exercise: Looping
- Exercise: Language Statements
- Strings
- String Methods
- String Equality
- StringBuffer
- StringBuilder
- Exercise: Fun with Strings
- Exercise: Using StringBuffers and StringBuilders
- Extending a Class
- Casting
- The Object Class
- Default Constructor
- Implicit Constructor Chaining
- Exercise: Creating Subclasses
- Exercise: Defining the Student Subclass
- Instance vs. Local Variables: Usage Differences
- Data Types
- Default Values
- Block Scoping Rules
- Final and Static Fields
- Static Methods
- Exercise: Field Test
- Arrays
- Accessing the Array
- Multidimensional Arrays
- Copying Arrays
- Variable Arguments
- Exercise: Creating an Array
- Exercise: Defining the Student Array
- Class Location of Packages
- The Package Keyword
- Importing Classes
- Executing Programs
- Java Naming Conventions
- Polymorphism: The Subclasses
- Upcasting vs. Downcasting
- Calling Superclass Methods From Subclass
- The final Keyword
- Exercise: Salaries – Polymorphism
- Separating Capability from Implementation
- Abstract Classes
- Implementing an Interface
- Abstract Classes vs. Interfaces
- Exercise: Mailable – Interfaces
- Exception Architecture
- Handling Multiple Exceptions
- Automatic Closure of Resources
- Creating Your Own Exceptions
- Throwing Exceptions
- Checked vs. Unchecked Exceptions
- Exercise: Exceptions
- Wrapper classes
- The number class
- Random numbers
- Autoboxing/unboxing
- The date class
- Exercise: Using primitive wrappers
- Enumeration Syntax
- When You Should Use Enumerations
- Using Static Imports
- When You Should Use Static Imports
- Exercise: Enumerations
- Introduce the new Date/Time API
- LocalDate, LocalDateTime, etc.
- Formatting Dates
- Working with time zones
- Manipulate date/time values
- Exercise: Agenda
- StringJoiner
- format
- out.printf
- The Formatter class
- Using the formatting syntax
- Generics and Subtyping
- Bounded Wildcards
- Generic Methods
- Legacy Calls To Generics
- When Generics Should Be Used
- Exercise: DynamicArray
- Exercise: Adding Generics to Dynamic Array
- Characterizing Collections
- Collection Interface Hierarchy
- Iterators
- The Set Interface
- The List Interface
- Queue Interface
- Map Interfaces
- Using the Right Collection
- Collections and Multithreading
- Exercise: Using Hashtable and HashMap
- Exercise: Collections Poker
- Exercise: Writing a Collection
- Functional vs OO Programming
- Anonymous Inner-classes
- Lambda Expression Syntax
- Functional Interfaces
- Method references
- Constructor references
- Introduce the ConcurrentHashMap
- Lambda expressions and Collections
- Exercise: Functional Collections
- Processing Collections of data
- The Stream interface
- Reduction and Parallelism
- Filtering collection data
- Sorting Collection data
- Map collection data
- Find elements in Stream
- Numeric Streams
- Create infinite Streams
- Sources for using Streams
- Exercise: Working with Streams
- Creating Collections from a Stream
- Group elements in the Stream
- Multi-level grouping of elements
- Partitioning Streams
- Exercise: Collecting
- 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
- The Java I/O Mechanism
- Subclasses Accessing Real Data
- Filter Classes
- New File IO – NIO
- NIO Overview
- Exercise: Files
- Annotations Overview
- Working with Java Annotations
- Exercise: Annotations
- Exercise: Using Annotations
- Connecting to the Database
- Statement and PreparedStatement
- ResultSet
- Executing Inserts, Updates, and Deletes
- Controlling Transactions and Concurrency
- Tutorial: Setup The Derby Database
- Exercise: Reading Table Data
- Exercise: Using JdbcRowSet
- Exercise: Executing within a Transaction
- StringJoiner
- format
- out.printf
- The Formatter class
- Using the formatting syntax
- The common thread pool
- Atomic variables
- LongAdder and LongAccumulator
- CompletableFuture
- Non-blocking asynchronous tasks
- Lab: CompletableFuture