Top Posters
Since Sunday
k
4
4
c
4
M
3
t
3
i
3
B
3
k
3
m
3
c
3
o
3
l
3
New Topic  
daniellasousa daniellasousa
wrote...
Posts: 510
4 years ago
When you run the following program, what will happen?

public class Test extends Thread {
public static void main(String[] args) {
Test t = new Test();
t.start();
t.start();
}

public void run() {
System.out.println("test");
}
}


▸ The program displays test twice.

▸ The program displays test once.

▸ Nothing is displayed.

▸ An illegal java.lang.IllegalThreadStateException may be thrown because you just started thread and thread might have not yet finished before you start it again.
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 33 times
1 Reply
Replies
Answer verified by a subject expert
ShayT0923ShayT0923
wrote...
Posts: 387
4 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

daniellasousa Author
wrote...

4 years ago
Thanks
wrote...

Yesterday
Smart ... Thanks!
wrote...

2 hours ago
Brilliant
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  910 People Browsing
Related Images
  
 1670
  
 358
  
 676
Your Opinion