Fifth International World Wide Web Conference
Constructed Types: Classes
- Declaration of a Java
class
shares many common aspects
with classes in C++
- Java only supports single inheritance
- Effect of multiple inheritance may be achieved through the use of the
interface
construct
- A class may be declared to be
abstract
- No method implementations provided
- All derived classes must provide implementations for all methods defined in
the abstract class
- Java classes may declare both variables and methods
- Variable defined inside of a class is an instance variable - one
copy per object
- Class methods invoked by applying them to an instance of a class object
Java - An Introductory Language Tutorial
(E.A.Johnson)