877-277-2477
info@capstonecourseware.com
104. Intermediate Java Programming
Version 7.0

Book cover

This course teaches programming in the Java language -- i.e. the Java Standard Edition platform. It is intended for students with previous Java experience or training, who already know the fundamentals of the Java architecture and basic procedural programming. This course provides in-depth coverage of object-oriented concepts and how to apply them to Java software design and development. We then move from these basic skills into key parts of the Java SE Core API, including collections, logging, streams, and object serialization. A final chapter introduces automated unit-testing practices using JUnit.

This revision of the course targets the Java 7 language and Core API. See our course catalog for training explicitly geared to earlier versions of Java, going back as far as J2SE 1.4.2. To read more about different versions of Java and for help deciding on which version of this course to use, see "Java Versions and Terminology Demystified".)

Students come to Java from a wide range of backgrounds, and this course is designed to be as flexible as possible over the upper end of that range. Specifically:

  • Experienced C and C++ programmers will find this course a very good fit and if anything will find that they complete it in a little less than the full five-day timeline.
  • Those with experience in languages less like Java, such as Visual Basic, ASP and other Web-scripting languages, and other pseudo-object-oriented languages may need more time in the early going, and this course covers its introductory topics in good depth and offers many optional and "challenge" labs to support this.
  • Less experienced programmers or those coming from non-structured languages -- such as COBOL, PL/1, or 4GL tools -- will probably not cover the whole course in a week, and may want to pursue an abbreviated version at a slower pace. This too is quite feasible, but this audience may also want to consider our Course 102, "Introduction to Java Programming," for a more relaxed pace through the early material.

Prerequisites

  • Students must be able to write, compile, test, and debug simple Java programs, using structured programming techniques, strong data types, and flow-control constructs such as conditionals and loops. Course 102 is ideal preparation for this course.

Learning Objectives

  • Chiefly, learn to program effectively in the Java language.
  • Understand the Java software architecture, and the design decisions which make Java software portable, efficient, secure and robust.
  • Learn how to configure a simple Java development environment.
  • Know the grammar, data types and flow control constructs of the Java language for simple procedural programming.
  • Understand Java as a purely object-oriented language, and implement software as systems of classes.
  • Implement and use inheritance and polymorphism, including interfaces and abstract classes.
  • Design appropriate exception handling into Java methods, and use the logging API appropriately.
  • Understand the structure of streams in Java, and learn how to use streams to manage file I/O.
  • Learn how to use Java Serialization to internalize and externalize potentially complex graphs of objects.
  • Build unit tests for Java classes using JUnit.

Timeline: 5 days.

IDE Support: Eclipse Indigo

  • In addition to the primary lab files, an optional overlay is available that adds support for Eclipse Indigo. Students can code, build, deploy, and test all exercises from within the IDE. See also our orientation to Using Capstone's Eclipse Overlays.

Chapter 1. Review of Java Fundamentals

  • The Java Architecture
  • Forms for Java Software
  • Three Platforms
  • The Java Language
  • Numeric Types
  • Characters and Booleans
  • Enumerations
  • Object References
  • Strings and Arrays
  • Conditional Constructs
  • Looping Constructs
  • Varargs

Chapter 2. Object-Oriented Software

  • Complex Systems
  • Abstraction
  • Classes and Objects
  • Responsibilities and Collaborators
  • UML
  • Relationships
  • Visibility

Chapter 3. Classes and Objects

  • Java Classes
  • Constructors and Garbage Collection
  • Naming Conventions and JavaBeans
  • Relationships Between Classes
  • Using this
  • Visibility
  • Packages and Imports
  • Overloading Methods and Constructors
  • JARs

Chapter 4. Inheritance and Polymorphism in Java

  • UML Specialization
  • Extending Classes
  • Using Derived Classes
  • Type Identification
  • Compile-Time and Run-Time Type
  • Polymorphism
  • Overriding Methods
  • The @Override Annotation
  • Superclass Reference

Chapter 5. Using Classes Effectively

  • Class Loading
  • Static Members
  • Statics and Non-Statics
  • Static Initializers
  • Static Imports
  • Prohibiting Inheritance
  • Costs of Object Creation
  • Strings and StringBuffers
  • Controlling Object Creation
  • Understanding Enumerated Types
  • Stateful and Behavioral Enumerations

Chapter 6. Interfaces and Abstract Classes

  • Separating Interface and Implementation
  • UML Interfaces and Realization
  • Defining Interfaces
  • Implementing and Extending Interfaces
  • Abstract Classes

Chapter 7. Collections

  • Dynamic Collections vs. Arrays
  • UML Parameterized Type
  • Generics
  • Using Generics
  • The Collections API
  • The Collection<E> and List<E> Interfaces
  • The ArrayList<E> and LinkedList<E> Classes
  • Looping Over Collections: Iterable<E>
  • Collecting Primitive Values: Auto-Boxing
  • Using Wildcards with Generic Types
  • Iterators and the Iterator<E> Interface
  • Maps and the Map<K,V> Interface
  • Sorted Collections
  • The SortedSet<E> and SortedMap<K,V> Interfaces
  • The Collections Class Utility
  • Algorithms
  • Conversion Utilities

Chapter 8. Exception Handling

  • Reporting and Trapping Errors
  • Exception Handling
  • Throwing Exceptions
  • Declaring Exceptions per Method
  • Catching Exceptions
  • The finally Block
  • Catch-and-Release
  • Chaining Exceptions
  • try-with-resources

Chapter 9. Inner Classes

  • Passing Behavior
  • Inner Classes in GUI Programming
  • Named Inner Classes
  • Outer Object Reference
  • Static Inner Classes
  • Anonymous Inner Classes

Chapter 10. The Java Streams Model

  • Delegation-Based Stream Model
  • InputStream and OutputStream
  • Media-Based Streams
  • Filtering Streams
  • Readers and Writers

Chapter 11. Working with Files

  • File Class
  • Modeling Files and Directories
  • File Streams
  • Random-Access Files

Chapter 12. Advanced Stream Techniques

  • Buffering
  • Data Streams
  • Push-Back Parsing
  • Byte-Array Streams and String Readers and Writers

Chapter 13. Java Serialization

  • The Challenge of Object Serialization
  • Serialization API
  • Serializable Interface
  • ObjectInputStream and ObjectOutputStream
  • The Serialization Engine
  • Transient Fields
  • readObject and writeObject
  • Externalizable Interface

Chapter 14. Automated Unit Testing with JUnit

  • Automated Testing
  • JUnit and Related Tools
  • The @Test Annotation
  • The Assert Class Utility
  • Test Runners
  • Lifecycle Methods

System Requirements

Hardware Requirements (Minimum) Core 2 Duo, 1.8 GHz, 1 gig RAM, 500 meg disk space.
Hardware Requirements (Recommended) Core 2 Duo, 2.8 GHz, 4 gig RAM, 500 meg disk space.
Operating System Tested on Windows 7. Course software should be viable on all systems which support a Java SE 7 Developer's Kit.
Network and Security Limited privileges required -- please see our standard security requirements.
Software Requirements All free downloadable tools.