Volatile variables are fetched from main memory and are not cached anywhere within the thread. Trips to main memory are expensive
But in the code we can directly call join()
t.join() tells the JVM, 'Please wait for thread t to die and then continue execution'. The aim being that one thread should wait for another to complete before proceeding. join() calls the method on the current executing instance. I am not sure what that would accomplish