Volatile forces variable modifications to be visible to multiple threads. It's not something that the average Java programmer will ever have to worry about.
But if you start doing a lot of concurrent programming, you will probably use this. It's one way of allowing concurrent access to a variable by multiple threads without having to use synchronization locks, which can speed up a program's execution. It works best for optimizing situtiations where one
thread is writing to a variable, and multiple threads are reading from that same variable.
[ April 02, 2002: Message edited by: Rob Ross ]