Java Reference
In-Depth Information
10.
Suppose that a task is scheduled using the following statement:
someTimer.scheduleAtFixedRate(someTask, 0, 60000);
Which of the following statements is true? Select all that apply.
a. The task will be scheduled immediately.
b. The task will be scheduled 60 seconds after its first completion.
c. The task will be scheduled every 60 seconds, no matter how long the task takes
to execute.
d. If the timer is canceled, the task will not be scheduled again.
e. If the task is canceled, the task will not be scheduled again.
11.
True or False: Declaring a method as synchronized causes the method to run in its
own thread.
12.
True or False: A synchronized method synchronizes on the this reference of the object.
13.
True or False: When a thread that invoked wait() receives a notify(), it still is blocked
waiting for the lock to become available.
14.
True or False: The notify() method wakes up only one waiting thread.
15.
True or False: When a thread invokes the wait() method, the thread releases the corre-
sponding object's lock.
Search WWH ::




Custom Search