public class Test { public static void main(String[] args) { Thread request1 = new Thread(new InternetRequest (),"request#1 "); Thread request2 = new Thread(new InternetRequest (),"request#2 "); request1.start(); request2.start(); } } class InternetRequest implements Runnable { public void run() { System.out.print(Thread.currentThread().getName()); } }
public static void main(String[] args) {
Thread request1 = new Thread(new InternetRequest (),"request#1 ");
Thread request2 = new Thread(new InternetRequest (),"request#2 ");
request1.start();
request2.start();
}
class InternetRequest implements Runnable {
public void run() {
System.out.print(Thread.currentThread().getName());
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.