Which two are valid constructors for Thread?

  • Thread(Runnable r, String name)
  • Thread()
  • Thread(int priority)
  • Thread(Runnable r, ThreadGroup g)
  • Thread(Runnable r, int priority)

Note/Explanation

(C), (D), and (E) are not legal Thread constructors, although (D) is close. If you reverse the arguments in (D), you'd have a valid constructor.

Leave a Reply

© 2017 Micro Solutions Bangladesh and/or MCQ Academy.