+ 1

Help Please

Fill in the blanks to run the method in a separate thread. class A Thread { public void () { System.out.println("Hello"); } public static void main(String[ ] args) { A object = new A(); object. (); } }

30th Jun 2018, 9:31 AM
Rustam Erik
Rustam Erik - avatar
7 Respostas
+ 8
extends run start
24th Jan 2019, 5:44 AM
Adones Edullantes
Adones Edullantes - avatar
+ 1
run,start
30th Jun 2018, 4:55 PM
Nitish kumar jha
Nitish kumar jha - avatar
+ 1
You need to call object.start(), when you call start your thread is formed and than run is called on it's own.
10th Jul 2018, 8:09 AM
Dhruv garg
Dhruv garg - avatar
+ 1
class A extends Thread { public void run () { System.out.println("Hello"); } public static void main(String[ ] args) { A object = new A(); object. start (); } } I think so
1st Aug 2019, 5:05 AM
Mewan Athukorala
Mewan Athukorala - avatar
0
answers in order: extends run start
10th Mar 2021, 7:09 PM
Rusz Tamás
Rusz Tamás - avatar
0
out.println("bye");
2nd Jul 2021, 12:34 AM
Hellokhaan
0
class A extends Thread { public void run () { System.out.println("Hello"); } public static void main(String[ ] args) { A object = new A(); object. start (); } }
1st Jan 2022, 11:26 AM
M.I.M.Aqueel
M.I.M.Aqueel - avatar