Introduction
to Java Programming
for Non-C Programmers
5 Day Course Description
This course is paced to provide a solid foundation
in Java for programmers without syntax experience in a C-based
language. Intensive and hands-on, the course emphasizes
becoming productive quickly as a Java 5.0 programmer. Besides
learning the basic structure and syntax of the language,
students will also learn object-oriented principles and
how they are applied in Java applications. The course then
covers several of the provided API packages, such as I/O
streams, collections, Swing GUI programming, and accessing
a database with JDBC. Appendices on threading and J2EE are
also available for further study.
Audience
Programmers moving to object-oriented programming
using Java.
Prerequisites
Professional programming experience in a high level
language, such as COBOL and Visual Basic.
Course Contents
Getting Started with J2SE
What is Java?
How to Get Java
A First Java Program
Compiling and Interpreting Applications
The JDK Directory Structure
Datatypes and Variables
Primitive Datatypes
Declarations
Variable Names
Numeric Literals
Character Literals
String
String Literals
Arrays
Non-Primitive Datatypes
The Dot Operator
Operators and Expressions
Expressions
Assignment Operator
Arithmetic Operators
Relational Operators
Logical Operators
Increment and Decrement Operators
Operate-Assign Operators (+=, etc.)
The Conditional Operator
Operator Precedence
Implicit Type Conversions
The Cast Operator
Control Flow
Statements
Conditional (if) Statements
Adding an else if
Conditional (switch) Statements
while and do-while Loops
for Loops
A for Loop Diagram
Enhanced for Loop
The continue Statement
The break Statement
Methods
Calling Methods
Defining Methods
Method Parameters
Scope
So, Why All the static?
Object-Oriented Programming
Introduction to Object-Oriented Programming
Classes and Objects
Fields and Methods
Encapsulation
Access Control
Inheritance
Polymorphism
Best Practices
Objects and Classes
Defining a Class
Creating an Object
Instance Data and Class Data
Methods
Constructors
Access Modifiers
Encapsulation
Using Java Objects
Printing to the Console
printf Format Strings
StringBuilder and StringBuffer
Methods and Messages
toString
Parameter Passing
Comparing and Identifying Objects
Destroying Objects
Using the Primitive-Type Wrapper Classes
Autoboxing
Inheritance in Java
Inheritance
Casting
Method Overriding
Polymorphism
super
The Object Class
Advanced Inheritance and Language Constructs
Enumerated Types - Pre-Java 5.0
Enumerated Types Today
More Enumerated Types
Abstract Classes
Interfaces
Using Interfaces
Comparable
Collections
Generics
Packages
Packages
The import Statement
Static Imports
CLASSPATH and Import
Defining Packages
Package Scope
Exception Handling
Exceptions Overview
Catching Exceptions
The finally Block
Exception Methods
Declaring Exceptions
Defining and Throwing Exceptions
Errors and RuntimeExceptions
Assertions
Input/Output Streams
Overview of Streams
Bytes vs. Characters
Converting Byte Streams to Character Streams
File Object
Binary Input and Output
PrintWriter Class
Reading and Writing Objects
Basic and Filtered Streams
Core Collection Classes
The Collections Framework
The Set Interface
Set Implementation Classes
The List Interface
List Implementation Classes
The Queue Interface
Queue Implementation Classes
The Map Interface
Map Implementation Classes
Collection Sorting and Tuning
Using Java 5.0 Features with Collections
Sorting with Comparable
Sorting with Comparator
Sorting Lists and Arrays
Collections Utility Methods
Tuning ArrayList
Tuning HashMap and HashSet
Inner Classes
Member Classes
Local Classes
Anonymous Classes
Instance Initializers
Static Nested Classes
Introduction to Swing
AWT and Swing
Displaying a Window
GUI Programming in Java
Handling Events
Arranging Components
A Scrollable Component
Configuring Components
Menus
Using the JFileChooser
Introduction to JDBC
The JDBC Connectivity Model
Database Programming
Connecting to the Database
Creating a SQL Query
Getting the Results
Updating Database Data
Finishing Up