views:

546

answers:

1

Is it like, static means one copy of the value for all objects , volatile means one copy of the value for all thread.? any way static variable value also going to be one value for all threads, then why should we go for volatile. Please help. I have confusion on this.

+1  A: 

You should have a look at

What is the difference between a static global and static volatile variable?

astander