public class multithreading implements Runnable{
//reaching thread class other by implementing runnable interface
public void run() {
System.out.println("Thread is running ");
}
public static void main(String[] args) {
multithreading obj =new multithreading();
Thread t1= new Thread(obj);
t1.start();
}
}
OUTPUT
//reaching thread class other by implementing runnable interface
public void run() {
System.out.println("Thread is running ");
}
public static void main(String[] args) {
multithreading obj =new multithreading();
Thread t1= new Thread(obj);
t1.start();
}
}
OUTPUT
Thread is running
No comments:
Post a Comment