This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Threads in java

A small program that shows THREADS in action.

public class TwoThread extends Thread {
public void run() {
for (int i = 0; i < 10; i++) {
System.out.println(“New thread”);
}
} public static void main(String[] args) {
TwoThread tt = new TwoThread();
tt.start();
for (int i = 0; i < 10; i++) {
System.out.println(“Main thread”);
}
}
}

VN:F [1.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. THREADS IN JAVA
  2. JAVA Tutorial
  3. JAVA Tutorial II
  4. Java interview questions
  5. C# simple console application
  6. JAVA Simple Tutorial Part-I

Leave a Reply

Comments (required)

Spam Protected