Implementing the Constructor
nThe constructor is invoked when creating a new instance of an object. nIt initializes the component variables of the object.
n
npublic counter () {
n tally = 0;
n}
n