Fifth International World Wide Web Conference
Java Class Example (revised): Notes
- The methods getCounter and SetCounter now have the same name: Counter
- Example of function overloading
- The two functions are distinguished by the type and number of arguments
- The class variable, counter, has been declared with the
private
attribute
- Variable accessible only to methods defined within the class
- Accessor methods provide a means of controlling the state of
instance variables
Java - An Introductory Language Tutorial
(E.A.Johnson)