Preview:
public class lab30 implements Runnable
{
public void run()
{
for(int i=0;i<5;i++)
{
try
{
Thread.sleep(500);
System.out.println(i);
}
catch(InterruptedException e)
{
System.out.println(e);
}
}
}
public static void main(String[] args)
{
lab30 obj=new lab30();
Thread obj2= new Thread();
obj2.start();
}
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter