Target Audience
This course covers all major aspects of programming with Java. It is essentially a condensed version of courses EC21 (Java Primer) and EC22 (Java Programming) but excludes topics on Threads and Networking.
Pre-requisites
The student should be familiar with the Windows host environment. Knowledge of any programming language is advantageous but not essential.
Course Objectives
The aim of this course is to give students a fully rounded general knowledge of programming with Java providing not just basic skills but moving onto more advanced topics including Collections, Threads, I/O and Networking.
During the course the student will write many applications, classes and applets ensuring that the statements taught are fully understood and practical experience is gained.
On completion of this course the student will be able to:
-
use the major concepts of a modern, block-structured, high-level language, such as control flow, method calls and modular programming
-
structure programs using classes and other essential object-oriented features
-
take advantage of and understand Interfaces
-
use the Collections Framework (both Java 1.1 and Java 1.2 implementations)
-
create and handle Exceptions
-
use the Java Input/Output classes
-
understand and use Serialization to achieve persistence
Course Environment
Development will be performed using:
- Eclipse
- NetBeans
- Websphere Studio Application Developer
- Rational Application Developer
- JBuilder
- the Java Development Kit (JDK) plus a text editor
Course Details
- INTRODUCTION TO JAVA
- What is Java?
- The Java Programming Language
- The Java Platform, the ClassPath
- What Can Java Do?
- Overview of the many subjects covered by Java
- Advantages of using Java
- Creating a java class
- Running Simple Applications
- A simple first example - The "Hello World" Application
- OBJECT-ORIENTED CONCEPTS
- An introduction to Objects
- What is an Object?, Encapsulation
- Communicating between objects
- What are Messages?, the benefits of Messages
- Classes
- What are Classes?, Objects vs. Classes, instantiation, the benefits of Classes
- Inheritance
- What is Inheritance?, the benefits of Inheritance
- THE JAVA LANGUAGE
- Variables
- Usage Types, Data Types, Literal Values, Naming Standards, Scope, Initialisation, Constants, Escape Characters
- Arrays & Multi-Dimentional Arrays
- Strings
- Strings are objects!, Concatenation, Testing for String equality, Manipulation
- Operators
- Arithmetic, Unary, Relational, Conditional, Bitwise, Assignment, Expressions
- Primitive Casting & Data Type Conversion
- Control Flow Statements
- if-else, switch, For, While, Do-while, break and continue, Labeled Loops
- The return Statement
- Enums (Java 5)
- Passing Arguments to JAVA Programs
- OBJECTS, METHODS AND CLASSES
- Introduction to Classes and Objects
- Methods, Applications & Object Code
- Creating & Manipulating Objects, Calling Methods, Passing Arguments and Method Overloading, Returning Values from Methods
- Constructors, Static Code
- Varargs (Java 5)
- Inheritance - Extending a Class
- What does a Subclass Inherit?
- Methods in java.lang.Object
- Garbage Collection & Finalization
- PACKAGES
- Packages, Using Package Members, Importing
- JAVA KEYWORD SUMMARY
- Accessibility Modifiers
- Declaration Parameters
- Class modifiers, Variable modifiers, Method modifiers
- CONVERSION, FORMATTING AND PRECISION
- Data Type Conversion, Wrapper Classes
- Autoboxing (Java 5)
- Decimal Precision and the BigDecimal class
- Numeric Formatting, Date Formatting
- Formatting (Java 5)
- CASTING
- Literal Values, Implicit & Explicit Casting, Casting With Operators
- Casting Objects, Narrowing & Widening
- ABSTRACT CLASSES AND INTERFACES
- Abstract Classes and Methods
- Interfaces
- Defining An Interface, Implementing An Interface
- Coding To Interfaces - Polymorphism
- COLLECTIONS
- Collection Interfaces And Implementations
- Summary & Comparison Of Collection Implementations
- Lists: ArrayList, Vector, LinkedList
- Maps: HashMap, Hashtable, TreeMap, LinkedHashMap
- Sets: HashSet, TreeSet, LinkedHashSet
- Iterator And Enumeration Interfaces
- Other Collections: Stacks, Properties
- Sorting Objects
- The Comparable Interface, Comparators
- More ways to Sort Objects:
- java.util.Collections, java.util.Arrays
- Collections Method Reference
- GENERICS
- Parameterised Collections
- Parameterised Types And Iterators
- Parameterised Maps
- Passing Parameterised Types As Method Arguments
- Sorting Data With Generics
- THE FOR-IN STATEMENT
- What the for-in statement can be used with
- Writing Your Own Iterable Classes
- ERROR HANDLING
- Java Exceptions
- Runtime and Checked Exceptions, Try / Catch Processing, The Finally Block
- Passing Exceptions up the Stack
- The throws statement
- Creating new Exceptions
- The Throw Statement, Error and Exception Classes, User Defined Exceptions
- Exceptions And Object Hierarchies
- JAVA I/O
- The Java I/O API
- The File class, Input and Output Streams, Readers and Writers
- Reading from System Input, Reading from Files
- Standard Output Stream - System.out
- Types of I/O classes
- Buffering input/output, ByteArrays, CharArrays, DataStreams
- Serialization - Persistence of Objects
- THE ECLIPSE/RAD/WSAD DEVELOPMENT ENVIRONMENT (if applicable)
- The Workbench
- Perspectives, Views, Toolbars, Editors
- Importing and exporting, Searching
- Rearranging Views, Fast Views
- Working With Java
- Working with buildpaths and classpaths
- Fixing Problems, Creating new Classes and Interfaces
- The Java Editor
- Editing code and elements, Content/Code Assist, Code Formatter
- Managing Imports, Local History, Refactoring
- Other Views
- The Type Hierarchy, Using the Outline View
- Running and Debugging apps
Course Format
Practical sessions make up a large part of the course, allowing delegates to demonstrate and reinforce the lectures given. During these sessions the delegate will build a simple but complete application.
Examples are used extensively, ranging from simple code 'snippets' to full applications with complete ‘real world’ functionality. These are supplied at the start of the course and it is encouraged that the delegates execute and ‘experiment’ with these under the instructor’s guidance as they are introduced.
These examples are available to take away, along with the delegate’s own work.
The comprehensive Student Guide supplied is fully indexed serving as a useful reference tool long after the course has finished. Delegates will also be able to access a free help-line with technical questions relating to topics covered on the course.
|