Specifications
Sun Services
Java™ Programming Language
v
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Compile-Time Errors ............................................................................................................................ 1-21
Runtime Errors ...................................................................................................................................... 1-22
Java Technology Runtime Environment ........................................................................................... 1-23
Object-Oriented Programming ................................................................................ 2-1
Objectives ................................................................................................................................................. 2-2
Relevance .................................................................................................................................................. 2-3
Software Engineering ............................................................................................................................. 2-4
The Analysis and Design Phase ............................................................................................................ 2-5
Abstraction ............................................................................................................................................... 2-6
Classes as Blueprints for Objects .......................................................................................................... 2-7
Declaring Java Technology Classes ...................................................................................................... 2-8
Declaring Attributes ............................................................................................................................... 2-9
Declaring Methods ................................................................................................................................ 2-10
Accessing Object Members .................................................................................................................. 2-11
Information Hiding ............................................................................................................................... 2-12
Encapsulation ........................................................................................................................................ 2-14
Declaring Constructors ........................................................................................................................ 2-15
The Default Constructor ...................................................................................................................... 2-16
Source File Layout ................................................................................................................................ 2-17
Software Packages ................................................................................................................................ 2-18
The package Statement ........................................................................................................................ 2-19
The import Statement .......................................................................................................................... 2-20
Directory Layout and Packages .......................................................................................................... 2-21
Development ......................................................................................................................................... 2-22
Compiling Using the -d Option ......................................................................................................... 2-23
Terminology Recap ............................................................................................................................... 2-24
Using the Java Technology API Documentation .............................................................................. 2-25
Java Technology API Documentation With HTML3 ....................................................................... 2-26










