HI
problem:
Write the definition of a class Clock . The class has three instance variables: One of type int called hours , another of type boolean called isTicking , and the last one of type Integer called diff . You should also write a constructor that takes three parameters -- an int , a boolean , and another int . The constructor should set the instance variables to the values provided.
my code:
public class Clock (int time, boolean dog, int add)
{
hours = time;
isTicking = dog;
diff = new Integer (add);
}
I dont know what is wrong with this code, there was a similar question to this one except " you are given a class Clock..." and my code was same as one above except removing "class"
thanks!! really appreciated This is my first Java course this is really frustrating :D
thanks!