Introduction to Java
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 introduced. (An in-depth coverage of threads is impossible in the time available. We also will provide architectural overviews of a few of the "core" packages.
The class can be presented in a 3-day lecture-only format or in a 5-day lecture-and-lab format.
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
- 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 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?
- The Java Architecture
- The JVM architecture
- Applets vs. Applications
- Run-time Loading
- The Distribution Model
- The Java Security Model
- Intranets and Java:
- The JDK (Java Development Kit)
- 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.
- 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
- Variance
- Covariance
- Contravariance
- Bivariance
- Foreach and Generics
- Metadata/Annotations
- Defining annotation classes.
- Accessing annotations via the introspection APIs.
- The java.lang Package.
- The Object Class
- equals
- toString
- hashCode
- clone
- java.lang.Math
- The Class Class (java.lang.Class)
- The class Field
- Primitive-type Wrapper Classes (java.lang.Boolean, java.lang.Integer, etc.)
- The Runtime Class (java.lang.Runtime) and Introspection APIs
- The System Class (java.lang.System)
- Threads (synchronized, Thread, Runnable, java.util.concurrent)
- 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()
- The java.util.concurrent classes
- Standard Utilities (Collections, Logging, java.util.*)
- Autoboxing
- Generic Collections
- Collections and Foreach
- I/O Utilities (java.io)
- The Decorator Pattern
