Thanks Harwinder,
This is not Dan's question strictly speaking. I can give you my most educated "guess" of what's going on here, and it'd be up to you to agree or disagree.
Class NewThread extends
Thread and also implements Runnable. It looks like its public void run() is in place. Indeed, it's not needed at all as class Thread already implements Runnable. Class Target also implements Runnable legally and has a legal working run() method. Line
Thread nt=new NewThread(new Target(s)); creates an object of type NewThread and polymorphically assigns it to a reference of type Thread. Fine. A new Target object is created and passed as a target Runnable to the NewThread constructor. Now,
nt.start() looks like starting a new thread on an anonimous instance of Target. However, in the NewThread class, run() is overridden, so its start() will invoke an empty run() in NewThread instead of run() of Target. The rest is simple: nobody fights for a lock on s object. main() thread enters the synchronized block and hangs there. For good. Nothing is printed. The synchronized block in Target's run is unnecessary. Nobody cares.
