The ______ interface is used when you want a task to return a value after execution in a thread.
- Callable
- Executable
- Runnable
- Threadable
In Java, the Callable interface is used when you want a task to return a value after its execution in a separate thread. It's similar to the Runnable interface but allows for a return value.
Loading...
Related Quiz
- If we have a 2D array int[][] arr, the expression arr[i] refers to the __________.
- Which of the following methods returns the number of rows affected by the DML operation?
- Can an interface contain static methods in Java?
- What is the effect of calling the yield() method in a thread?
- ________ is an interface in JDBC, which can be used to move a cursor in the result set in both directions.