Hi everyone, My doubt relates to the "single object" concept talked about in synchronisation. We know that two threads can conflict only when the "runnable instance" is the same (Please correct me if im wrong, this has been my understanding so far.) , for example:
Now Threads a and b above have the same runnable instance mt, and its precisely because of this ONE runnable instance that the entire concept of "thread conflict" and "synchronization" comes about...once again plaease correct me if Im wrong.
Now what I want to ask is, how do you get a single runnable instance when you extend the thread class, as in :
So in the code above do we have a SINGLE runnable instance? If not then how do we do it when we extend the Thread class?
Please Help.
Thanks in advance,
Ravissant Markenday