Brian Goetz

Java for C++ Programmers

Audience This course is aimed at experienced C++ developers who are new to the Java language and platform.   
Duration 5 days
Structure Lecture, demonstrations, and hands-on labs
Students will
  • Learn the syntax, idioms, and development philosophy of the Java language
  • Gain familiarity with the core Java class libraries
  • Understand key philosophical, syntactic, and semantic differences between C++ and Java
  • Explore the principles of good API design in Java
  • Gain experience with advanced language features such as reflection, serialization, and concurrency
Overview This course is designed for experienced C++ programmers who are new to the Java language, to help them quickly adapt not only to the mechanics of a new language, but its idioms and best practices as well.  For each course element (philosophy, syntax, class libraries, idioms), the material is presented in terms that will be readily understood by experienced C++ developers. 

In addition to learning language elements and idioms, students will learn commonly used patterns in Java class design and implementation, and gain an introduction to how current development tools can accelerate the development cycle.  

COURSE OUTLINE
  • Philosophical language differences from C++
  • Quick introduction to the Java language
    • Syntax
    • History and language development
    • Data types
    • Access modifiers, data hiding, and encapsulation
    • Classes, interfaces, and packages
    • Dynamic memory management
  • Tools
    • JDK tools
    • JavaDoc
    • IDEs
    • ANT
    • JUnit
  • Objects in Java
    • The root Object class
    • Inheritance
    • Dynamic class loading
  • Object lifecycle
    • Construction patterns – constructors, factories, singletons
    • Garbage collection
    • Initialization and final variables
    • Destruction vs finalization
  • Naming and coding standards
  • The Java class library
    • Collections
    • Swing and AWT
    • IO Streams
    • JDBC database access
  • Exception handling
    • Exceptions
    • try, catch, finally
    • Checked and unchecked exceptions
  • Classes and interfaces
    • Extension and composition
    • Interfaces
    • Abstract classes
    • Inner classes
    • Anonymous classes
    • Mutability and immutability
  • Class design and implementation
    • Variable scoping
    • Naming conventions
    • Exceptions
    • Defensive coding techniques
    • Documentation
  • Multithreading
    • Threads and thread-safety
    • Race conditions
    • Synchronization
    • Deadlock
  • Serialization
  • Reflection
  • Dynamic class loading
  • New features in JDK 5.0
    • Generics
    • Enumerations
    • Autoboxing
    • Variable-length argument lists
    • Concurrency improvements
    • Metadata