Note: (Restricted functionality due to obvious reasons!)
Minimal Code ( Raw-View ) :
class ThreadsRun
{
public static void main(String zee[])
{
ThreadServerRestricted objs = new ThreadServerRestricted();
ThreadClient objc = new ThreadClient();
//Thread obj2 = new Thread(new T2()); // T2-class -implements Runnable
try
{
objs.start();
objc.start();
try
{
if(objc.isAlive())
{
objs.sleep(2000);
objc.join();
}
}
catch(Exception e)
{
System.out.println("\n-innerTry: "+e);
}
}
catch(Exception e)
{
System.out.println("\nOuterMostTry: "+e);
}
}
}