Write the definition of a class Clock. The class has no constructors and two instance variables. One is of type int called hours and the other is of type boolean called isTicking.
LANGUAGE: JAVA
CHALLENGE:
Write the definition of a class Clock. The class has no constructors and two instance variables. One is of type int called hours and the other is of type boolean called isTicking.
SOLUTION:
public class Clock { private int hours; private boolean isTicking; }
Posted in Java, Learn To Code