Thursday, July 3, 2008

SCJP: Questions on Thread

  1. ___ is the normal priority value of a Thread.

5

  1. ___ method waits until the thread on which it is called terminates.

join

  1. The ____ method returns true if the thread upon which it is called is still running.

isAlive

  1. A thread can attain a lock on an object only if the class of that object implements Runnable. True/False?

False.

  1. The wait() method can not be invoked from synchronized code. True/False

False

  1. A class lock is obtained on synchronizing the ___ methods of a class.

static

  1. A dead thread cannot be stated again. True/False?

True

  1. Threads in Java are platform dependent. True/False

True

  1. when we invoke notify(), it is not possible to specify which thread is to be notified. True/False?

True

  1. sleep() method declares ___ in its throw clause.

InterruptedException

No comments: