Files
Adv_java/RunnableTest.java
Aditya Tiwari 725861a154 Added 2B
2026-01-23 14:30:24 +05:30

16 lines
433 B
Java

class x implements Runnable {
public void run(){
for(int i=0; i<=5; i++){
System.out.println("The Thread x is: "+i);
}
System.err.println("End of the Thread x");
}
}
class RunnableTest {
public static void main(String[] args) {
x r = new x();
Thread threadx = new Thread(r);
threadx.start();
System.out.println("The end of the main thread");
}
}