Hi, Edisandro.
At first it looks like a question about serialization more than a questions about multithreading.
First, I share your assessment: saying that answer B is correct implies the supposition that none of those references are transient. So this looks like a wrong question to me.
The option d seems to be an answer intended to see if you confuse volatile with transient.
Now transient implies that field member will not be serialized. Volatile is related to multithreading.
Volatile is related to
Java Memory Model, the threads are allowed to keep copies of their variables, if one
thread modifies one this variables other threads may not realize of the change. Marking a variable as volatile implies that any reading or writing of the variable will be reconciled with the master copies of themselves.
Volatile also ensures that the reading and writing operations of the variables are done atomically. That means that two thread will not write the same variable concurrently, but one after the other.
This is very important for variables bigger than 32 bits, like long or double, because they would be treated as two reads or writes of 32 bits. With volatile, 64-bit writes and reads will be enforced.
Another important issue related to volatile variables is that fact that some processors may execute the sentences in different order than that expected by the developer, as long as it does not alter the final result. Many modern processors can do this to optimize code, however, it may have implications on multithreading. Volatile enforces that the operations will be executed as programmed.
Finally, it is important to understand that, although a single read and single write will be enforced to be atomic operations , a combination of both won't. Hence incrementing a variable (i++) implies reading and writing the variable. After the reading the variable could be incremented by another thread before this thread increments it. This kind of behavior has to be enforced with Synchronization or with the atomic variables now present in Tiger.
[ April 14, 2006: Message edited by: Edwin Dalorzo ]