Multiple choice

Which one of the following is not a valid constructor of Timer class?

  1. Timer()

  2. Timer(Boolean isDaemon)

  3. Timer(String name)

  4. Timer(char[] name)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

There are four constructors for a Timer class:

  1. Timer()
  2. Timer(Boolean isDaemon)
  3. Timer(String name)
  4. Timer(String name,Boolean isDaemon)