← Questions
Runnable versus Callable and a thread-safe singleton
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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).
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
