Please explain the Fallowing line , "There are two threads acting on same instance",
Dose this mean like invoking start on same instance? like
Thread t=new Thread ();
I think we cann't say start() on same instance twice?
I think we need more context to know what is meant by "There are two threads acting on the same instance."
You cannot call start() more than once on the same Thread. You will get an IllegalThreadSTateException at runtime. As documented under Thread's start method, "It is never legal to start a thread more than once."
However, you can create a Runnable object (a class that implements Runnable), and use that instance in multiple Threads. For example...
But again, without more context, I don't know if this is what the original quote means.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org