INTRODUCTION TO JAVA AND JAVA ENTERPRISE USING ECLIPSE WITH JBOSS – GTJ14

Course Description

This course introduces the Java programming language and how to develop Java applications using eclipse and JBoss. Students learn the syntax of the Java programming language, object-oriented programming using Java, exception handling, file input/output (I/O), along with servlets and JavaServer Pages. During the course, students will develop and test Java applications using eclipse with JBoss.

Practical work: Extensive practical exercises take students through all major aspects of the design and development of Java programs. Students will be introduced to various wizards and tools available from eclipse.

Objectives

After completing this course, the student should be able to:

  • Apply OOP principles
  • Design OO applications using abstraction, encapsulation, modularity and hierarchy
  • Use Java exceptions to guarantee graceful error recovery for your application
  • Create and use inner classes in your program to make them concise and clear
  • Do input/output using Java
  • Create servlets and JavaServer Pages
  • Use eclipse for Java application development

^^

Duration

5 days

^^

Target Audience

This course is intended for programmers who are interested in adding Java to their skills.

This course provides an introduction to Java and Java Enterprise. This course is ideal for those that will not be taking a more in-depth course on Java Enterprise. For those that will also be taking an in-depth course on Java Enterprise technologies the following course may be a more appropriate:

Introduction to Java: GTJ01

^^

Course Prerequisites

The students must be familiar with object-oriented principals and the concept of object-oriented programming.

^^

Suggested Follow on Courses

There are a number of options of suitable follow-on courses, depending on your business needs. Please contact us for further details.

^^

Course Content

CHAPTER 1. OVERVIEW OF JAVA

History Of Java

Benefits Of Java

What Is Java?

What’s This “Virtual Machine”?

Comparison to Other Languages

Java Programs

Basic Java Development Tools

Java Editions

Example – HelloWorld

Java Classes

Main Methods

Statements

CHAPTER 2. JAVA TOOLS IN ECLIPSE

Eclipse Platform

Eclipse Workspace

Perspectives, Views & Editors

Basic Operations with Eclipse Views and Perspectives

The Java Perspective

The Debug Perspective

Navigator View

Package Explorer

Outline View

Problems View

Eclipse Preferences

Build and Validation

Code Completion, Templates and Snippets

Searching

Configure Compiler Class Path

JRE Switching

CHAPTER 3. BASIC OBJECT CONCEPTS

What Is An Object?

State

Behavior

Encapsulation

Encapsulation Examples

Classes vs. Objects

Inheritance

Interfaces

Polymorphism

Benefits Of Objects

CHAPTER 4. BASIC JAVA SYNTAX

Declaring And Initializing Variables

Keywords

Coding Tips – Variables

Primitive Data Types

Logical – boolean

Textual – char and String

Integral – byte, short, int, long

Floating Point – float and double

Literal Values

Strings

Creating Strings

White Space

Comments

Coding Tips – Comments

Java Statements

Coding Tips – Statements

Scope of a Variable

System.out/System.in

Scanner Class

CHAPTER 5. OPERATIONS AND MAKING DECISIONS

Operator Categories

Special Situations

Binary Operators

Integer Division

Numeric Promotion

Type Conversion Of Primitive Types

Unary Operators

Relational Operators

Logical Operators

“Short Circuited” Operators

Bitwise Operators

Bitwise Examples

Shift Operators

Overflow And Underflow

Assignment Operators

Ternary Operator

Calculation Errors

Operator Precedence

Precedence Examples

Combining Strings

Coding Tips – Operators

Control Flow Statements

‘if’ Statement

‘if…else’ Statement

Nested Statements

Coding Tips – if & if-else

CHAPTER 6. USING CLASSES AND OBJECTS

Objects, Instances, And Classes

What Are Classes?

Working With Classes And Objects

Instantiation

Instance Methods

Object References

String Operations

“Wrapper” Classes

Autoboxing

CHAPTER 7. WRITING CLASSES

Why Define Your Own Classes?

Encapsulation

Elements Of A Class

Defining Classes

Coding Tips – Class Definitions

Fields

Defining Fields

Coding Tips – Fields

Methods

Defining Methods

Passing Parameters

Overloading Methods

Coding Tips – Methods

Local Variables vs. Instance Variables

Example – Defining a Class

Example – Fields

Example – Defining a Method

Example – Calling a Method

CHAPTER 8. CONTROLLING CODE ACCESS AND CODE ORGANIZATION

Controlling Access

Data Hiding

Encapsulation

JavaBeans

Packages

Naming Packages

Declaring Packages In Classes

Problems Solved With Packages

Package Access

Example – Access Modifiers

Import Statement

Using Classes From Packages

Coding Tips – Import Statements

Correlation To File Structure

Class Path

Java Core Packages

Java API Documentation

CHAPTER 9. CONSTRUCTORS AND CLASS MEMBERS

Constructors

Default Constructor

Multiple Constructors

Defining Constructors

Example – Calling Constructors

“Good” Constructors

‘this’ Keyword

Using ‘this’ to Call a Constructor

Using ‘this’ to Set a Field

Class Members

Examples Of Class Members

Comparison With Instance Members

Use Of Class Variables

Static Class Methods

Use Of Class Methods

The Math Class

Main Method And Command Line Arguments

Declaring Constants

Coding Tips – Class Members

Useful Standard Class Members

Initialization Blocks

Static Initialization Blocks

CHAPTER 10. ADVANCED CONTROL STRUCTURES

‘switch’ Statement

Example – switch

Switch “Fall Through”

Using switch “Fall Through” for Multiple Options

‘for’ Loop

Example – for

‘while’ Loop

Example – while

‘do…while’ Loop

Example – do while

Break Statement

Example – break

Labeled Statements

Example – Labeled break

Continue Statement

Example – continue

Example – Labeled continue

Coding Tips – Control Structures

CHAPTER 11. ARRAYS

Arrays

Declaring Arrays

Populating Arrays

Accessing Arrays

Arrays of Objects

Array Length

Coding Tips – Arrays

Array References

Multidimensional Arrays

Arrays Of Arrays

Copying Arrays

For-Each loop

Variable Arguments

Variable Arguments Example

CHAPTER 12. INHERITANCE

Inheritance Is…

Inheritance Examples

Declaring Inheritance

Inheritance Hierarchy

Access Modifiers Revisited

Inherited Members

Instances Of A Subclass

Example Of Inheritance

Role In Reuse

The super Keyword

Example – super Keyword

Problems with Constructors

Limiting Subclasses

Calling Methods in Constructors

The Object Class

CHAPTER 13. COMMONLY OVERRIDDEN METHODS

Overriding Methods

@Override Annotation

toString()

toString() in Object

Overriding toString()

Comparing Objects

Using == vs. equals(..)

Overriding equals(..)

Complex Comparisons

equals(..) Example

hashCode()

Overriding hashCode()

hashCode() Example

Generating equals and hashCode

CHAPTER 14. ADVANCED JAVA TOOLS

Refactoring

Renaming Elements

Moving a Class to a Different Package

Extracting Code to a Method

Other Source Code Refactoring

Refactoring to Improve Type Hierarchy

Generalizing a Variable

Pull-up and Push-down

CHAPTER 15. EXCEPTIONS

What is an Exception

Benefits

The Exception Class

How to Work With Exceptions

Example Exception Handling

The try-catch-finally Statement

Flow of Program Control

Exception Hierarchy

Checked Exceptions

Unchecked Exceptions

Coding Tips – Exception Types

Catching Multiple Exceptions

Specifying Thrown Exceptions

Rethrowing Exceptions

Chaining Exceptions

Creating your Own Exception

CHAPTER 16. INTERFACES AND POLYMORPHISM

Casting Objects

The instanceof Operator

Abstract Classes

Abstract Class – An Example

Interface

Interface – An Example

Comparable Interface

Comparable Example

Coding Tips – Superclass or Abstract Class/Interface?

Coding Tips – Abstract Class or Interface

Polymorphism

Conditions for Polymorphism

Coding Tips – Leveraging Polymorphism

Covariant Return Types

Covariant Return Types – An Example

CHAPTER 17. COLLECTIONS AND GENERICS

What are Collections?

Arrays vs. Collections

Main Collections Interfaces

java.util.Collection

Main Collection Methods

Sets

java.util.List

java.util.Queue

Iteration on a Collection

Iterator vs. For-Each Loop

Maps

java.util.Map

Other Maps

Collections Implementations

Abstract Implementations

Choosing a Collection Type

Generics

Generics and Collections

Generic Collection Example

Collections and Primitive Types

CHAPTER 18. USEFUL JAVA CLASSES

Java Logging API

Control Flow of Logging

Logging Levels

Loggers

Logging Example

Logging Handlers

Logging Formatters & Log Manager

Logging Configuration File

Example Logging Configuration File

Logging Filters

java.lang.StringBuilder

java.util.StringTokenizer

java.util.Arrays & java.util.Collections

java.util.Random

java.util.Date

GregorianCalendar & Calendar

Formatting

Formatting Example

CHAPTER 19. INPUT AND OUTPUT

Overview of Java Input/Output

The File Class

File Example

Serialization

Serializing Object State

Avoiding Serialization Problems

serialVersionUID

Options for File Input/Output

Streams

Input Stream

Output Stream

“Chained” Streams

RandomAccessFile

Using Streams – Write Example

Using Streams – Read Example

Reader and Writer

Using Readers and Writers – Write Example

Using Readers and Writers – Read Example

Using Readers and Writers – Scanner Read Example

Buffers

Channels

Using Buffers and Channels – Write Example

Using Buffers and Channels – Read Example

CHAPTER 20. OTHER JAVA CONCEPTS

Annotations

Enumerated Types

Enumerated Types – Example

Assertions

Assertions Example

When to use Assertions

Enabling Assertions

JVM Storage Areas

Java Heap Space

Heap Size Limits

Garbage Collection Basics

Allocation Failure (AF)

OutOfMemoryError

Memory Leak

Distributing Java Code with JARs

CHAPTER 21. SERVLET BASICS

History – CGI

Server Extension APIs

Java Servlet

Servlet Container

Servlet Responsibilities

J2EE and Servlet

The Servlet Class

The HttpServlet Class

An Example – Hello World

Registering the Servlet

The Servlet Container

The Servlet API

Life Cycle – Initialization

Example Initialization

Life Cycle – Processing

Life Cycle – Destroy

User Input

Example – User Input

Output to Client

Servlet Error Handling

Threading Issues

CHAPTER 22. JAVASERVER PAGE (JSP) BASICS

JavaServer Pages

A Simple Example – Hello.jsp

JSP Benefits

Evolution of Dynamic Content Technologies

How JSP Works

JSP Invocation

Generated Servlet

JSP Scripting Elements

The XML Syntax

JSP Directive

page Directive Attributes

page Directive – an Example

page Attribute – errorPage

page Attribute – isErrorPage

Using XML Syntax

Directives – include

Include – an Example

Request time inclusion

Include at compile time vs. at request time

JSP Declarations

Declarations – an Example

JSP Expressions

JSP Expressions – an Example

JSP Scriptlets

JSP Scriptlets – an Example

JSP Comments

JSP Predefined Variables

The request Object

The response Object

The out Object

Out – an Example

CHAPTER 23. ENTERPRISE JAVABEANS (EJBS) OVERVIEW

Need for EJBs

Distributed Computing

Distributed Transaction

Distributed Security

What are EJBs?

Main Characteristics of EJBs

EJB Remote Method Call

EJB Architecture Components

EJB Client

EJB JAR File

EJB Container

EJB Server

Enterprise JavaBeans

Session Beans

Entity Beans

Java Persistence API – Entities

Message-Driven Beans (MDBs)

EJB Specification

CHAPTER 24. OVERVIEW OF JAVA SE APIS

Java GUI Programming

Networking

Security

Databases – JDBC

Concurrent Programming

Naming – JNDI

Management – JMX

XML

Web Services

Remote Method Invocation

Image I/O

Printing

^^

See more Java courses