1-Write the definition of a class Clock . The class has no constructors and thre
ID: 441277 • Letter: 1
Question
1-Write the definition of a class Clock . The class has no constructors and three instance variables. One is of type int called hours , initialized to 12 , another is of type boolean called isTicking , initialized to true , and the last one is of type Integer called diff , initialized to 5 . =================================================================================================== One of the constructors for PrintStream class has a single OutputStream argument. Assume that dos is a variable that references an OutputStream object. Create a PrintStream object using dos and assign the resulting reference to ps, a PrintStream variable that has already been declared.Explanation / Answer
class Clock { private int hours=12,diff=5; private boolean isTicking=true; }
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.