Paul Clapham wrote:No. But that's because declaring a variable as volatile doesn't make it thread-safe.
Roel De Nijs wrote:The url was in the post, only lacking the "http://" part. That's why it was not being rendered. Other possibility: using google with "Sun Microsystems Certification Manager Database"...
Roel De Nijs wrote:In the Sun Microsystems Certification Manager Databaseyou can create a Credentials Report (with an overview of all your certifications) and mail this report to an email address of your choice.
Anupam Sinha wrote:I think that the code is not thread safe.
This simple looking line
is not thread safe. Java only guarantees a 32 bit to be atomic (unless otherwise made atomic). So nextVal should be made volatile.
Apart from this I am not able to understand this program much.
I am unable to understand how this program (barring the above reason) will be thread safe (if it is made to compile).
getNextval is not synchronized so even acquiring a lock on sequenceValue shouldn't matter much.
Roel De Nijs wrote:Hi Jack,
First of all congratulations!
Oracle has changed the grading policy: you will only get a score if you fail. So when you pass (like you did), you will not get any score, only the pass grade. So no total score anymore, no score per section.