WeRide·Software Engineer·Technical Phone Screen
- What are the differences between Thread, Runnable, and Callable in Java? When would you use each?
- Can you explain the Java Memory Model and how it governs visibility and ordering between threads?
- What are the differences between volatile, synchronized, Lock, and the Atomic classes? When is each appropriate?
- Why is i++ not thread-safe, and how does this relate to the lost update problem?
- How would you implement a thread-safe counter without using synchronized?
- What new features or improvements were introduced in a recent JDK version that you found useful?
“Ran through the basics fine but stumbled a bit when they pushed on Callable vs Runnable beyond just 'Callable returns a value.' Should've talked more concretely about Future and how you actually get the result back.”