SCJP 6.0 96%
(Connecting the Dots ....)
SCJP 6.0 96%
(Connecting the Dots ....)
SCJP 6.0 96%
(Connecting the Dots ....)
SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
Martin Vanyavchich wrote:I does not compile
That shouldn't work. You can't change object reference if it's marked final.
SCJP 6.0 96%
(Connecting the Dots ....)
Censorship is the younger of two shameful sisters, the older one bears the name inquisition.
-- Johann Nepomuk Nestroy
SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
http://plainoldjavaobject.blogspot.in
Lalit Mehra wrote:
good one ... I almost fell in the trap with final members playing it the rough way ...
anyways ... the answer as per i think is
1. true // for both are literals
2. false // concatenation invokes constructor
3. true // both are final hence can be treated as constants or literals
4. false
5. false
Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
SCJP 6.0 96%
(Connecting the Dots ....)
SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
If you find any post useful, click the "plus one" sign on the right
SCJP 1.4, SCWCD 1.4
M.Sc. in CS, OCPJP6 93%
Consider Paul's rocket mass heater. |