Java 30 - threads runnabwl

PHOTO EMBED

Sun Nov 26 2023 17:14:15 GMT+0000 (Coordinated Universal Time)

Saved by @Java

class A implements Runnable 
{ 
public void run() 
{ 
for(int i=0;i<5;i++) 
{ 
try 
{ 
Thread.sleep(500); 
System.out.println("Hello"); 
} 
catch(Exception e){} 
} 
} 
} 
class B 
{ 
public static void main(String... args) 
{ 
A x=new A();
  Thread t1=new Thread(x);

t1.start(); 

} 

} 

}
content_copyCOPY