previous
|
start
|
next
Constructors
A constructor initializes the instance variables
Constructor name = class name
public class Greeter()
{
public
Greeter
(String aName)
{
name = aName;
}
. . .
}
Invoked in
new
expression
new Greeter("Dave")
previous
|
start
|
next