Java: An Intensive Introduction
Java has become the Object-Oriented programming language of choice for many programmers. It has evolved from a simple language for augmenting web sites with active content to a full-blown enterprise-enabled programming language suitable for developing significant applications. Moreover, Java is platform independent-a compiled Java program can run under virtually any operating system It is ideal for large internal networks, where it can vastly reduce the cost of system maintenance, and is the language of choice for server-side applications.
Java eliminates the unnecessary complexity of C++ while providing all of C++'s benefits. The libraries (packages) that come with the language are superior to most C++ libraries: they are powerful and easy to use, with none of the bad design and unnecessary complexity of some commercial C++ libraries such as the Microsoft Foundation Classes. These libraries include sophisticated threading, network, security, and graphical facilities.
Course Description
This course, for experienced programmers and technical managers, introduces Java as a general-purpose object-oriented programming language. We cover the entire language in depth, including the hard-to-understand parts of the language such as inner classes. We'll also look beyond the simple syntax at how to apply the language properly in an OO programming environment. Java's threading model is discussed in depth along with several of the "essential" packages.
The class can be presented in a lecture-only format or in a lecture-and-lab format. Class length can vary from 3 to 5 days, depending on how much time you'd like to spend on ancillary material such as threads and the various Java packages. We can also present this class in a traditional 10-week format, meeting one day a week with required homework assignments between sessions.
On completion of this class, you will:
- Understand what Java is, it's benefits and weaknesses
- Thoroughly understand the syntax and structure of the Java language
- Understand how to use the language properly in an object-oriented environment
- Understand the architecture of the core packages (libraries) and how to use them in a general way.
Who Should Attend?
This course is fast paced and technically rigorous. It is intended for professional programmers and technical managers who know C, C#, or C++ and want to come up to speed on Java as quickly as possible.
Outline
- Object-oriented design fundamentals
- Differences between OO and procedural systems.
- What is an object?
- Data Abstraction
- Accessors and Mutators (and the problems with them).
- The Java Architecture
- The JVM architecture
- Run-time Loading
- The Distribution Model
- The Java Security Model
- The JDK
- Javadoc
- Other parts of the JDK
- The Java Language
- Naming Conventions
- Compiler Input and Output Files
- Hello World
- Unicode
- Comments and "javadoc"
- The Global Level
- Packages
- Static imports
- Declarations of Primitive Types
- strictfp
- Operators and Precedence
- Control Flow
- Space Allocation and Object References
- null
- Garbage Collection
- Arrays
- Foreach
- Strings
- StringBuffer
- String Comparison
- enum (constrained types)
- The existing idioms
- The new mechanism
- Classes
- Methods and Method Overloading
- Variable-length argument lists
- Field Initialization
- Named constants
- Static Initialization Blocks
- Constructors
- Blank Finals and Immutable Objects
- Conditional Compilation
- Implementation Inheritance (extends)
- Method Overriding (Polymorphism) and super
- Up and Down Casting.
- Methods and Method Overloading
- Interfaces (implements)
- Getting around the No-method-implementations-in-an-interface Problem
- Problems with derivation
- Fragile Base classes.
- Inner Classes
- Basics of Inner Classes
- Static Inner Classes
- Nonstatic Inner Classes (The "That" Reference)
- Anonymous Inner Classes
- Inner-Class Construction
- Using Inner Classes for Enumerated Types with Strong Type Checking
- Callbacks (the "observer" pattern, publisher/subscriber, adapters)
- Event Demultiplexing
- Exceptions
- Errors
- Finalizers (are not destructors)
- Generics
- Using Generics (the new Collection classes)
- Generics and UML
- Writing generic classes
- Bound and Raw types
- Type Erasure (differences from C++ and C#).
- Generics and Subtyping
- Wildcards
- Wildcard Capture
- Generic Methods
- Covariance
- Contravariance
- Bivariance
- Foreach and Generics
- Metadata/Annotations
- Defining annotation classes.
- Accessing annotations via the introspection APIs.
- Threads
- Creating Threads (Thread and Runnable)
- Thread States:
- Threads and Garbage Collection
- Inter-thread communication
- Priorities
- Daemons
- Thread Groups
- Synchronization and Monitors
- Object-Level Synchronization:
- Method-Level Synchronization:
- Synchronizing static Methods
- Synchronizing static Fields
- wait() and notify()
- Active Objects
- Memory Consistency Problems
- Double Checked Locking
- java.util.concurrent classes
- Atomic values (AtomicInteger, AtomicReference
, etc.) - Locks
- Condition, Lock, ReadWriteLock
- ...Synchronizer, Rentrant...Lock
- Primitives
- Semaphore, Executor, Exchanger, CyclicBarier,
- Thread-Safe Collections and other Data Structures
- ConcurrentMap, ConcurrentNavigableMap, ConcurrentLinkedQueue, etc.
- BlockingQueue, CopyOnWrite, etc.
- Thread Pools
- Locks
- Atomic values (AtomicInteger, AtomicReference
- Essential Packages
- The java.lang Package.
- The Object Class
- equals
- toString
- hashCode
- clone
- java.lang.Math
- The Class Class (java.lang.Class)
- Introspection (Reflection) APIs
- Accessing/modifying fields
- Calling methods
- Annotations
- Introspection (Reflection) APIs
- The class Field
- Primitive-type Wrapper Classes (java.lang.Boolean, java.lang.Integer, etc.)
- Autoboxing
- The Runtime Class (java.lang.Runtime) and Introspection APIs
- The System Class (java.lang.System)
- Logging
- Collections
- Collections and Foreach
- I/O Utilities (java.io)
- The Decorator Pattern
- Adapters: InputStream, FileInputStream, OutputStream, FileOutputStream, StringBufferInputStream, etc.
- Decorators: ...Reader, ...Writer, LineNumberInputStream/Reader, ObjectInputStream, GZIPInputStream, etc.
- Optional topics (time permitting)
- JDBC (java.sql)
- Initialization: Driver, DriverManager
- Connection
- Querys and ResultSet
- Transactions
- PreparedStatement
- SQL-Injection exploits.
- JDOM (XML parsing)
- JSON parsing
- GWT and cloud computing
- Stab (C# for the JVM).
- JVM languages: Scala, Groovy, etc.
- JDBC (java.sql)
