Top Posters
Since Sunday
5
k
4
c
4
4
M
3
t
3
i
3
B
3
k
3
m
3
c
3
o
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 34 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 for your help!!
wrote...

Yesterday
This helped my grade so much Perfect
wrote...

2 hours ago
Smart ... Thanks!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  804 People Browsing
Related Images
  
 8981
  
 419
  
 3556
Your Opinion
Who will win the 2024 president election?
Votes: 8
Closes: November 4