Rob
SCJP 1.4
help you means help me
Originally posted by Roy Ben Ami:
first u dont check the 1 and 2 , u check the x and y. check the question.
second, i think the answer is false meaning it wont always return false. sometimes it can return true!
the synchronized doesnt help me here does it?
cause it get synchronized on an object instance and we have 2 of those. and the variables are static. so it can happen that one thread finishes doing ++ on both x and y. and then the othe thread does x++ only and then the first thread checks to see if x and y are different and its true!
am i correct Val or Rob or Kumar?
btw its pretty late here now so excuse my typos.
i think ill check your replies tomorrow![]()
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|