Here is the review question (No.4) from chapter 9 of the SCJPjava 6 book
Assume you have a class that holds two private variables: a and b ...
I think the author assume a and b are primitive type (such as int) and therefore in all the answer we have
and the answer states that answer C and D are incorrect are incorrect because only objects can be used to synchronize on, which make sense if you read only the answer. However, I went through all the possible cases. What if variable a and b are Strings? a+b will result in another string. In this case, I would say D is still incorrect because it synchronize on different variable. However, my answer for that question becomes B C and F.
Sorry if people already asked this question. I couldn't find it in the forum using the following key word