Exam 22: Concurrency

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following statements is false?

(Multiple Choice)
4.9/5
(70)

Class Instant's static method ________ gets the current time.

(Multiple Choice)
4.8/5
(76)

The main method executes in the ________ thread of execution.

(Multiple Choice)
4.9/5
(84)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(74)

When a thread obtains the monitor lock on an object, then determines that it cannot continue with its task on that object until some condition is satisfied, the thread can call Object method ________; this releases the monitor lock on the object, and transitions the thread waits to the waiting state.

(Multiple Choice)
4.9/5
(69)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(79)

Streams are easy to parallelize, enabling programs to benefit from enhanced performance on ________ systems.

(Multiple Choice)
4.9/5
(88)

To obtain a parallel stream, simply invoke method ________ on an existing stream.

(Multiple Choice)
4.9/5
(82)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(82)

In a producer/consumer relationship, the ________ portion of an application generates data and stores it in a shared object, and the ________ portion of an application reads data from the shared object.

(Multiple Choice)
4.7/5
(76)

NumberFormat static method ________ returns a NumberFormat that's used to format a number as a percentage.

(Multiple Choice)
4.9/5
(70)

A new thread begins its life cycle by transitioning to the __________ state.

(Multiple Choice)
4.8/5
(79)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(70)

Which of the following statements is false?

(Multiple Choice)
4.8/5
(71)

Interface ExecutorService provides the ________ method, which returns control to its caller either when all tasks executing in the ExecutorService complete or when the specified timeout elapses.

(Multiple Choice)
4.8/5
(82)

The ArrayBlockingQueue method ________ returns the number of elements currently in the ArrayBlockingQueue?

(Multiple Choice)
4.9/5
(86)

When using Java's built-in monitors, every object has a(n) ________ or a(n) ________ that the monitor ensures is held by a maximum of only one thread at any time.

(Multiple Choice)
4.9/5
(74)

When a thread executing a synchronized statement (or method) completes or satisfies the condition on which another thread may be waiting, it can call Object method ________ or ________ to allow a waiting thread or all waiting threads to transition to the runnable state again.

(Multiple Choice)
4.8/5
(79)

It’s recommended that you do not explicitly create and use Thread objects to implement concurrency, but rather use the ________ interface.

(Multiple Choice)
4.8/5
(66)

The preferred means of creating multithreaded Java applications is by implementing the ________ interface. An object of a class that implements this interface represents a task to perform.

(Multiple Choice)
4.7/5
(81)
Showing 21 - 40 of 54
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)