// Save as "thread_runnable.java"
class t1 implements Runnable
{
public void run() {
for(int i=0;i<=10;i++){
System.out.println("Values -->"+i);
}
}
}
public class thread_runnable {
public static void main(String args[])
{
t1 obj=new t1();
Thread t=new Thread(obj);
t.start();
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment