Manish
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Rob Prime:
The following is NOT thread safe
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Manish
Originally posted by Manish Thapliyal:
I have read that the final primitves are thread safe while object refrences do not ?
And the immutable onjects are not thread safe.
I am unable to understand the reason for the second one ?
Manish
Manish
Originally posted by amitabh mehra:
If you are a bit confused as to why immutable objects are not alwaysthread safe, perhaps you can get a hint in this blog: immuatability does not guarentee thread safety
[ June 03, 2008: Message edited by: amitabh mehra ]
Originally posted by satishkumar janakiraman:
The example given in the article is not a immutable class. It is a mutable class. If you want to write a immutable class, all object attributes must be final and private. Public setter methods should not be provided. Check the comments given in the article's page.
Originally posted by Manish Thapliyal:
If this topic is so simple then why your answer is not clear
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Originally posted by Manish Thapliyal:
If this topic is so simple then why your answer is not clear.
I have read that the final primitves are thread safe while object refrences do not ? And the immutable onjects are not thread safe.
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
"I'm not back." - Bill Harding, Twister
Originally posted by Jim Yingst:
[Jim]: A truly immutable class is thread-safe in all respects, no matter how you use it. (....) The keyword [b]final is necessary but not sufficient to make this happen. You are not doing anyone any favors by blurring the distinction between final and immutable.
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."