hello, I've been a visitor to JavaRanch for several months and have come to realize that the SCJP exam is heavy on threads. My only problem with the concept of threads are volatile variables. If a certain instance variable that is shared by several thread is cached for optimization puposes, how many copies of this variable can be created? Also, what variable is the "master" of a variable modified as volatile? Thanks
posted 15 years ago
Take a look at section 18.104.22.168 of the Java language specification. It answers these questions.