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

Discussion

Which of these is a static method of Thread?

  • A.getName
  • B.dumpStack
  • C.getStackTrace
  • D.setUncaughtExceptionHandler

Answer: B

Correct answer: dumpStack

Thread.dumpStack() prints a stack trace of the current thread, so like sleep and yield it concerns whoever is executing and is static. getName, getStackTrace and setUncaughtExceptionHandler all act on a named thread and are instance methods.

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

Post your comment

Please log in or register to post a comment.