When should you use the `volatile` keyword in Java?
You should use `volatile` when you need to ensure visibility of a variable across threads without needing synchronization or atomicity.
Exactly! `volatile` is useful when visibility is required, but atomicity and compound operations are not needed.
Can you provide an example where `volatile` is sufficient, and no synchronization is needed?