0
About thread
Is that "start" method from the "thread" class? Can anyone please answer.
2 Réponses
+ 2
Yes the start() is from Thread class which implements Runnable interface.
Here is a small piece of code for you to understand it better.
import java.util.*;
public class Program
{
public static void main(String[] args) {
A obj = new A();
obj.start();
}
}
class A extends Thread{
public void run(){
for(int i=1;i<=5;i++){
System.out.println(i);
}
}
}
0
got it bro ... Thankkss s