class ThreadExample{
public static void main(String args[])
{
Thread th=new Thread();
try{
for(int i=0;i<10;i++)
{
System.out.println(" Value "+i);
th.sleep(2000);
}
}
catch(Exception e)
{
System.out.println(" "+e.getMessage());
}
}
}
public static void main(String args[])
{
Thread th=new Thread();
try{
for(int i=0;i<10;i++)
{
System.out.println(" Value "+i);
th.sleep(2000);
}
}
catch(Exception e)
{
System.out.println(" "+e.getMessage());
}
}
}
No comments:
Post a Comment
Please post your comments. Your comments make us to write more programs for you.