| Author |
Can I synchronize a null object?
|
Nehal Vaidya
Greenhorn
Joined: Jan 18, 2002
Posts: 13
|
|
|
Was asked this question in an interview. Never though about synchronizing a null object till I was asked. :-)
|
Sun Certified Java 2 Programmer<br />Sun Certified Java 2 Developer<br />Sun Certified Web Component Developer<br />Sun Certified Enterprise Architect (Part I)<br />IBM Websphere Certified
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18652
|
|
Please take a moment and read our user name policy, and modify your display name accordingly. Thanks. As for your question, it's easy to test...
|
"I'm not back." - Bill Harding, Twister
|
 |
gautam shah
Ranch Hand
Joined: Oct 29, 2000
Posts: 72
|
|
Originally posted by Nehal: Was asked this question in an interview. Never though about synchronizing a null object till I was asked. :-)
101% even u can synchronized on null literal.
|
 |
Rob Ross
Bartender
Joined: Jan 07, 2002
Posts: 2205
|
|
What does 101% mean? When I do this, I get a null pointer exception. I am relieved as well, as that was my understanding of what would happen.
|
Rob
SCJP 1.4
|
 |
gautam shah
Ranch Hand
Joined: Oct 29, 2000
Posts: 72
|
|
Originally posted by Rob Ross: What does 101% mean? When I do this, I get a null pointer exception. I am relieved as well, as that was my understanding of what would happen.
200%
|
 |
 |
|
|
subject: Can I synchronize a null object?
|
|
|