• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/17

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

17 Cards in this Set

  • Front
  • Back
Threads created by user are always non-daemon threads?
they can be made daemon by setDaemon(true)
If you call setDaemon after thread start..
IllegalThreadStateException
What is the value of the basic Thread priority?
The priority of the newly created thread is set equal to the priority of the thread creating it
describe yeild() method of Thread class
Static method. Give hint to current thread to give up CPU to same priority threads
Object.wait() method exceptions
InterruptedException, IllegalMonitorStateException
in what circumstances InterruptedException is thrown?
waiting, sleeping, joining (or otherwise occupied) thread
interrupted and isInterrupted methods
interrupted - clear status, isInterrupted - don't cleat status
What methods cannot be synchronized
Abstract methods
What Thread.interupt() method do?
if wait/sleep/join - InterruptedException; otherwise - just set status
Some methods acquire locks, some not
acquiring a monitor will not prevent any other method which does not use monitors, from accessing the shared resource
Wait and notify order
If notify will run before wait the program will get stuck
Two threads try increment the value simultaneously
it can be incremented only by one as operation is not atomic
Whait is return type of call() method in Callable class?
type V - the result type of method call
Does Thread class implement Runnable interface?
Yes, it does.
Explain differences between RecursiveTask and RecursiveAction classes
RecursiveTask: task2.fork;return task2.join+task1.compute; RecursiveAction - no return.
List the main methods of Executor class
Executor is not a class but an interface. It contains just execute (Runnable command) method.
List main AtomicInteger methods
Add, increment, decrement and get
Get and add, increment, decrement
get, set
XXXvalue
compareAndSet