1.

Which of the following is a correct constructor for thread?(a) Thread(Runnable a, String str)(b) Thread(int priority)(c) Thread(Runnable a, int priority)(d) Thread(Runnable a, ThreadGroup t)This question was posed to me in an international level competition.My enquiry is from Multithreading topic in division Multithreading of Java

Answer»

Right answer is (a) Thread(Runnable a, STRING str)

EXPLANATION: Thread(Runnable a, String str) is a VALID constructor for thread. Thread() is ALSO a valid constructor.



Discussion

No Comment Found

Related InterviewSolutions