a) MyCircle is fully encapsulated b) The diameter is guarenteed to be twice the radius c)Lines 8 and 9 should be in a synchronized block to ensure encapsulation d)The radius of a Mycircle object can be set without affecting its diameter
According to the mock exam, the Answer is b.
But isnt b wrong. radius being a public variable can be modified by anyone. So how is this behaviour guaranteed. I feel d shud be the answer.. Any comments?
Joined: Mar 14, 2006
you have totally reasons... d is right
arno [ April 09, 2006: Message edited by: Arno Reper ]
The man who makes no mistakes does not usually make anything<br /> <br />>>> SCJP 5.0 >> SCJD B&S <<< In progress