Basic HTML version of Foils prepared May 12 1996

Foil 50 The Java Object Model Overview

From CRPC Lectures on Java Language Applets Graphics CRPC Annual Meeting Tutorial -- May 14,1996. by Geoffrey C. Fox


Objects are instances of Classes which form a template to allow definition of objects of the same type -- Classes are not objects although one can define static or class variables and methods which are shared by all instances of a class
The data of an object are called instance variables and they can be accessed for read or write via suitable methods which define the behavor of an object
/* Movable Point Class */
public class mPoint {
  • public int x, y; /* Instance Variable */
  • public int dx = 1, dy = 1; /* More Instance Variables */
Both class and its instance variables can be accessed by all other java objects



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Dec 14 1997