Course Summary
A comprehensive introduction to the Java programming language and central components of the Java Standard Edition (SE) Platform. Emphasizes hands-on lab exercises that allow students to quickly build proficiency, and that help shed light on some of the subtler aspects of working with Java. Also emphasizes the proper understanding and use of object-oriented techniques.
Duration
5 days.
Objectives
During lab exercises, attendees write non-trivial Java code that incorporates key features of Java, including interfaces, classes hierarchies, static and instance methods, Collections and arrays, file I/O, reflection, and XML processing.
This course also provides in-depth coverage of pragmatic testing issues and strategies.
Audience
Developers who are familiar with one or more programming languages but are new to Java, or who want to get a better grounding in the fundamentals.
General knowledge of the fundamental concepts of computer programming. Hands-on experience with a compiled programming language is helpful, but not required.
Additional Notes
For additional information on Java, please visit:
Sun Microsystems Java Technology page: http://java.sun.com/index.jsp
Wikipedia entry on the Java programming language: http://en.wikipedia.org/wiki/Java_programming_language
Outline
1. Overview
* Platform independence
* Byte code and JVMs
* Garbage collection
* Object-oriented features
* Compilers
o Hot spot
o JIT
* Libraries
o Java SE
o Java EE (J2EE)
2. The Java Ecosystem
* The Java Community Process (JCP)
o What is a JSR?
* Desktop GUIs: AWT, Swing, and SWT
* Java and XML
* Web technologies
o Servlets and JSP
o MVC frameworks
o Web services
* Persistence technologies
o JDBC
o JPA and object-relational frameworks
o EJB 2.0 vs. EJB 3.0
* Application Servers
o Lightweight containers
* Tooling
o Unit testing frameworks
o Build tools
o IDEs
3. Java Basics: the java.lang
* Statements
o Simple and compound statements
o Comments
* Operators
o Assignment
o Arithmetic
o Boolean
o Grouping
o String operations
* Variables and types
o Primitive types
o Object types
o Java 5 generics
o Declaring and de?ning variables
* Classes and instances
o String class
o Constructing an instance
o Method invocation
* Arrays
o Array declaration and de?nition
o Referencing elements
o The Arrays class
o System utility methods
* Control structures
o Branching
o Looping
o Exception handling
4. Writing Java Classes
* Java packages
o Namespaces
o The default package
* Class and instance members
o Instance variables
o Instance methods
o Properties
o Constructors
o Finalization
o Static variables and methods
o Visibility modi?ers
* Inheritance
o Base classes
o Object and Class classes
o Overriding inherited methods
o Abstract classes and methods
* Interfaces
o Implementing an interface
o Marker interfaces (Serializable, Cloneable, etc.)
o Interface inheritance
* Inner classes
o Where and how to use
o Declaring and accessing
o Anonymous inner classes
* Exception handling
o try/catch blocks
o When to use finally
o Error and Exception classes
o Runtime vs. checked exceptions
* Object identity
o equals vs. ==
o Implementing hashcode
o Classloader issues
* Java 5 annotations
o Custom annotations
* Unit testing
o JUnit and TestNG
o Mock objects and test isolation
5. Java Types: the java.util and java.text Packages
* Localization (i18n) issues
o Format and its subclasses
o Working with properties ?les
o ResourceBundle
* Wrapper types
o Java 5 autoboxing
o Number class
o Byte, Character, Integer,
o NumberFormat
* Working with Dates
o Date classes
o Calendar classes
o DateFormat
* The java.math package
o BigDecimal and BigInteger
o Rounding modes
* Collections
o Iterators
o Set and HashSet
o List and ArrayList
o The Collections utility class
* Maps
o Map and HashMap
o Map entries
6. Object-Oriented Concepts
* Inheritance
o Class heirarchies
o Implementation inheritance
o Overriding methods
o Shadowing instance variables
* Polymorphism
o Inheritance-based
o Re?ection-based
* Encapsulation
o Information hiding
o Controlling visibility
o Coupling and cohesion
7. Files and Streams
* Files and directories
* Working with streams
* Readers and Writers
* Buffering
* Serialization
8. Re?ection and Introspection
* Dynamic vs. compile-time binding
* Language-level support
o instanceof operator
* Dynamic instantiation
o newInstance method
* Dynamic invocation
o Method signatures
o Method lookups and caching
* Dynamic access
o Obtaining member values
o Modifying object state
9. Threads
* Thread safety
o Thread contention
o Avoiding deadlocks
* Current thread
o Obtaining classloader
o Accessing resources
* The ThreadLocal class
o Managing global state
10. XML
* XML Documents
o Elements and attributes
o The concept of 'well-formedness'
o DTDs and XML Schema
* Parsers
o SAX (Simple API for XML)
o DOM (Document Object Model)
o StAX (Streaming Asynchronous XML)
* Transformations
o CSS, XSL and XSLT
o The XPath language