We present in this chapter the basics of Java classes and objects.
In Java, the class is paramount. Essentially all coding resides
within class definitions. (Note: we
use the term object and instance
- Class Definition - all the qualities
of a class are specified in the class defintion, which
- Instantiation - Once a class is
defined you can create an instance of it
- Static (or Class) Members - Java's
version of global data and functions
- Value vs. Reference - the difference
in the way primitive variables and reference variables are passed
as method arguments.
- Primitive type values as method arguments.
- Modifying reference variables
- References as method arguments
- Demo 4
- Overloading - methods in the
same class with the same name but different argument lists are
said to be overloaded.
- Wrapper classes for the primitive types
- Arrays - brief introduction to this
- Exceptions - Java error handling.
If this is your first encounter withobject oriented programming,
you may want to read the following tutorial sections in the Chapter
3: Supplements section:
If you already know OOP from other languages, you may be interested
in these supplementary topics:
Latest update: Oct.5, 2005