Java Language Basics
and Object-Oriented Concepts
These examples are simple ones illustrating basic language constructs of Java. These can all be compiled in either 1.1 or 1.2. Almost all of them are Java applications.
Java Language Basics
Variables, Types, and Standard Output: Sum.java
One-dimensional Arrays: Sumarray.java
Control Structures: GradeAverage.java
The Math Package: RollDice.java
Streams for standard input: GradeAvStr.java
Methods: VolumeStr.java
Recursive Methods: Factorial.java
Object-Oriented Concepts and Exceptions
Class Definition and Use: Account.java and Accounttest2.java
Child Class Definition and Use: Accountcmp.java and Accountcmptest1.java
Exceptions: AccountException.java and AccountTestException.java
Movable Objects: mPoint.java, mRectangle.java, mOval.java and mTriangle.java
Drawable Objects: Drawable.java, DrawablePoint.java, DrawablePolygon.java, etc.