0% found this document useful (0 votes)
2 views13 pages

Java Runnable Thread Example

Uploaded by

kenabadane9299
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views13 pages

Java Runnable Thread Example

Uploaded by

kenabadane9299
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Class MyThread implements Runnable{

public void run() {


try {
[Link]("Runnable Thread:"+ [Link]().getName());
[Link](5000); }
catch (InterruptedException e)
[Link]([Link]()); } }
public static void main(String[] args) {
Thread t1 = new Thread(new NewClass());
Thread t2 = new Thread(new NewClass());
Thread t3 = new Thread(new NewClass());
[Link](); [Link]();
try {
[Link]();}
catch (InterruptedException e) {
[Link]([Link]()); }
[Link](); } }

You might also like