The ______ method of the Future interface is used to check if the task is done or not.
- checkDone()
- hasCompleted()
- isDone()
- taskStatus()
In Java, the isDone() method of the Future interface is used to check if a task submitted to a ExecutorService is completed or not. It returns true if the task is done; otherwise, it returns false.
Loading...
Related Quiz
- The keyword ________ is used to apply restrictions on class, method, and variable.
- The keyword ________ is used to skip the rest of the current loop iteration.
- How does Java manage the memory allocation of primitive and reference data types in the stack and heap?
- In a multithreaded application where multiple threads are reading and writing to a shared User object, how would you ensure that the read and write operations are thread-safe?
- Which class allows you to read lines of text from a file?