Facebook Twitter Reset

This Tutorial Has Been Viewed 1,270 Times.

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.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Incoming search terms:




You will also be interested in ,

No comments yet.

Leave a Comment

Spam protection by WP Captcha-Free

Affordable Seo PackagesSeo BlogEdu Backlinks
More in PHP, scripts (87 of 149 articles)