+ 2
What is the use of start in this program?
8 Antworten
+ 5
java
+ 5
start() will start the thread, I mean call the run method to execute
+ 4
this is from java tutorial> craeting runnable interfaces
+ 4
in Java or C# , start() method use to execute the thread object by calling the run() method
+ 2
@jayden leCorpa...i want to ask that what is object.start() is doing?
+ 2
class Loader implements Runnable {
public void run() {
System.out.println("Hello");
}
}
class MyClass {
public static void main(String[ ] args) {
Thread t = new Thread(new Loader());
t.start();
}
}
+ 2
thanks saravan
+ 1
ok bro ali thanks