I found that declaring a variable as static makes no sense in Multi-Threading. I assume that, this is because of every thread has its own stack. Is this the only reason?
I found that declaring a variable as static makes no sense
every thread has its own stack
I know that static variables should be used within synchronized block. but why?
static variables should be used within synchronized block