Runnable versus Callable and a thread-safe singleton

0
Remix

Java concurrency questions: explain the difference between Runnable and Callable (return value, checked exceptions, how each is run through an executor and Future), then write a singleton that is safe when several threads first ask for it at once, and explain why it is safe (eager init, synchronized access, double-checked locking with volatile, or a holder class).

AppleTechnical phone screenLast asked Jan 2026
No answer yet. Write the first one; the best answer gets endorsed.