Basic HTML version of Foils prepared June 5 99

Foil 46 An example of a class definition

From Java Language in the Computer Science Curriculum ADMI Tutorial Duluth Minnesota -- June 3 99. by Geoffrey C. Fox


1 public class FAstate extends otherClass implements someInterface { // instance variables private int state; //constructors public className ( . . . parameters . . . ) { . . . initialize instance variables (perhaps with parameters) . . . } // other method declarations public int getState ( ) { return state; } public advanceState ( int inc ) { . . . Change the state, using parameter inc . . . } }

in Table To:


© 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 Sat Jun 5 1999