This course provides a comprehensive introduction to Java suitable for programmers with existing experience. It can be taught to audiences with less experience by reducing coverage of the optional, more advanced topics.

In addition to teaching the fundamentals needed to be productive in basic Java programming, this course provides a solid understanding of the core OO and Java concepts needed to create well designed Java programs. It covers all the key OO capabilities and how to use them in Java, including material on creating well-designed Java classes using encapsulation, building more complex functionality with composition and using inheritance to share functionality and create specialized types. It also covers more advanced concepts such as using interfaces, working with the Java Collections Framework and overviews of accessing databases with JDBC and JPA (including labs using JPA).

This course is suitable for environments using Java 8 but almost all the labs can also be done with Java 7. The material and labs include coverage of useful new Java capabilities such as default/static methods in interfaces, try-with-resources (Java 7) and lambda expressions. It also stresses the use of good coding practices for all the examples and labs.

The course can be customized to fit your needs. Supported platforms include Java 8, Eclipse, IBM RAD (requires Java 8 support) and other IDEs upon request.

Course Duration: 5 days
Prerequisites:

Experience with Java programming is essential.

Course Objectives:
  • Understand Java’s importance, uses, strengths and weaknesses
  • Understand Java language basics
  • Write, compile and run Java programs
  • Understand the object model and object-oriented programming
  • Understand and use classes, inheritance, polymorphism
  • Create well-designed classes and use them in your Java programs
  • Use composition and delegation to create objects from other objects
  • Understand and use packages to organize code
  • Understand interfaces, their importance and their uses
  • Use interfaces to implement abstraction
  • Learn good Java coding style
  • Create well-structured Java programs
  • Compile and execute programs with the JDK development tools and with an Integrated Development Environment (IDE) of your choice
  • Use the core Java libraries (java.lang, java.util)
  • Understand and use exceptions for error handling
  • Understand the basics of using JDBC and JPA, and use them to access databases from Java
  • Use the Java Collections Framework
  • Be aware of and use the new features of Java 8, as well as important advanced features of earlier Java versions
  • Understand and use basic I/O streams (optional)
Course Outline:
  • A First Look
    • A Simple Java Class
    • Java’s “Hello World” Program
    • Lab – Hello World:  A Simple Application

 

  • Java Basics
    • Language and Platform Features
    • Program Life Cycle
    • The Java SE Development Kit (JDK)
    • Lab – Working with the Development Environment

 

  • Class and Object Basics
    • The Object Model and Object-Oriented Programming
    • Classes, References and Instantiation
    • Adding Data to a Class Definition
    • Adding Methods (Behavior)
    • Lab – Exploring Types and Object Instances
    • Lab – Writing and Using a Class Definition with Fields and Methods

 

  • More on Classes and Objects
    • Accessing Data, The “this” Variable
    • Encapsulation and Access Control, Public and Private Access
    • Constructors and Initialization
    • Static Members of a Class
    • Scopes, Blocks, References to Objects
    • Type-Safe Enums
    • Lab – Encapsulation / Access Protection
    • Lab – Writing and Using Constructors
    • Lab – (Optional) Static Members
    • Lab – Using Enums
    • Lab – Using the Debugger

 

  • Flow of Control
    • Branching: if, if-else, switch
    • Iteration: while, do-while, for, break, continue
    • Lab – Flow of Control / Data Validation

 

  • Strings and Arrays
    • String, StringBuffer, StringBuilder
    • Arrays, Primitive Arrays, Arrays of Reference Types
    • Varargs
    • Labs – Using Strings and Arrays

 

  • Packages
    • Package Overview – Using Packages to Organize Code
    • Import Statements
    • Creating Packages, Package Statement, Required Directory Structure
    • Finding Classes, Packages and Classpath
    • Lab – Using Packages to Organize Code

 

  • Composition and Inheritance
    • Using Composition to Deal with Complexity
    • Composition/HAS-A, Delegation
    • Using Inheritance and Polymorphism to Share Commonality
    • IS-A, Extends, Inheriting Features, Overriding Methods, Using Polymorphism
    • Class Object
    • Abstract Classes
    • Lab – (Optional) Working with Composition
    • Lab – Using Inheritance to Specialize Classes

 

  • Interfaces
    • Using Interfaces to Define Types
    • Interfaces and Abstract Classes
    • Default Methods and static Methods (Java 8)
    • Lab – Using Interfaces to Remove Implementation Dependencies

 

  • Exceptions
    • Exceptions and the Exception Hierarchy
    • try and catch
    • Handling Exceptions
    • Program Flow with Exceptions
    • finally
    • Lab – Throwing and Handling Exceptions

 

  • Java Collections and Generics
    • The Collections Framework and its API
    • Collections and Java Generics
    • Collection, Set, List, Map, Iterator
    • Autoboxing
    • Collections of Object (non-generic)
    • Using ArrayList, HashSet and HashMap
    • for-each Loop
    • Processing Items with an Iterator
    • More About Generics
    • Lab – Using Lists and Generics
    • Lab – Using Sets

 

  • Database Access with JDBC and JPA
    • JDBC Overview
      • JDBC Architecture and API
      • Using DriverManager, Connection, Statement and ResultSet
    • JPA Overview
      • JPA Architecture and Programming View
      • Entity Classes and Annotations
      • Mapping an Entity Class
      • EntityManagerFactory and EntityManager
      • Working with JPA (Find by primayry key and inserts)
    • Lab – Mapping an Entity Class
    • Lab – Working with JPA

 

  • Additional Java Features
    • Assertions
    • Annotations
    • Lambda Expressions and Method References (Java 8)
    • Additional Features

 

  • Session 14: I/O Streams (Optional)
    • Readers and Writers
    • Filter Streams
    • Byte Streams
    • Formatted Output
    • New I/O (NIO) APIs
    • Lab – Formatting Output

 

  • Appendix: JDBC
    • JDBC Overview
    • JDBC Architecture and API
    • Database Connections
    • Issuing Statements and Processing Data