Write the definition of a class Clock. The class has no constructors and one instance variable of type int called hours.

Write the definition of a class Clock. The class has no constructors and one instance variable of type int called hours.

LANGUAGE: JAVA

CHALLENGE:

Write the definition of a class Clock. The class has no constructors and one instance variable of type int called hours.

SOLUTION:

public class Clock {
   private int hours;
}

Add comment