+ 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. (); } }
7 Respostas
+ 8
extends
run
start
+ 1
run,start
+ 1
You need to call object.start(), when you call start your thread is formed and than run is called on it's own.
+ 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
0
answers in order:
extends
run
start
0
out.println("bye");
0
class A
extends
Thread {
public void
run
() {
System.out.println("Hello");
}
public static void main(String[ ] args) {
A object = new A();
object.
start
();
}
}