I'm just learning about threads.
I came across a program..
The character c doesn't increment after the first
thread execution.So except thr first thread,all the threads print B(before and after modification).
If I declare the variable char c as local variable as in 1 c value gets modified and prints A,B,C.
I know that each thread has its own copy of local variables.
why the variable is not incremented if it is a instance variable?
Why the variable gets modified perfectly if it is a local variable?
please explain....