Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of these is NOT a method declared on Thread?

  • A.getState
  • B.isDaemon
  • C.notifyAll
  • D.setName

Answer: C

notifyAll is declared on Object, so Thread has it only by inheritance, as every class does. setName, getState and isDaemon are all genuine Thread members. The distinction matters when reading which class the documentation puts a method under.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.