Java Reference
In-Depth Information
Notice that the methods
getNext( )
,
reset( )
, and
setStart( )
are declared using the
public
access specifier. This is necessary. Whenever you implement a method defined by an inter-
face, it must be implemented as
public
because all members of an interface are implicitly
public
.
Here is a class that demonstrates
ByTwos
: