Originally posted by Frank Carver:
It's surely just as reasonable to ask why would anyone serve a vegatable that's not meant to be eaten? I know I usually eat everyhting I'm served, and as I've never heard of serving food on a lilypad (edible or not) it's quite likely I would have tried eating it.
- Thread1 resumes to execute check() //result: false
- Thread2 resumes to execute setY(i) and then check() //result: true