asked 68.9k views
1 vote
You are given a class named clock that has one int instance variable called hours. write a constructor with no parameters for the class clock. the constructor should set hours to 12.

1 Answer

4 votes
in java it would be

public clock()
{
hours = 12;
}
answered
User Joe Caruso
by
8.0k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.