Explain Java volatile semantics
Company: PayPal
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: Medium
Interview Round: Technical Screen
Quick Answer: This question evaluates a candidate's understanding of Java's volatile semantics, specifically memory visibility, happens-before ordering, restrictions on instruction reordering around volatile accesses, and limitations such as lack of atomicity and contrasts with synchronized/locks.