|
Java Source Codes
Two Thread Simple Program
/**
* This is a Simple Thread Program
* @author jimmi.prajapati
*
*/
public class TwoThread extends Thread {
public void run() {
for (int i = 0; i < 100; i++) {
System.out.println("New thread");
}
}
public static void main(String[] args) {
TwoThread tt = new TwoThread();
tt.start();
for (int i = 0; i < 100; i++) {
System.out.println("Main thread");
}
}
}
<<<----- Return to
Java Source
Code Questions Page.
Have a Question ?
post your questions here. It
will be answered as soon as possible.
Check
Java Interview
Questions for more Java Interview Questions with answers
Check
Servlet Interview
Questions for more Servlet Interview Questions with answers
Check
Structs Interview
Questions for more Structs Interview Questions with answers
|