can a method be considered as a thread?
ex:
public static void main(String[]args){
a.method();
}
void method(){
System.out.println("print");
}
is 'method' a child thread or something like that,as it performs a task which is printing 'print'.or is 'main' method the only thread here?if so what is the difference between a thread and a method? Thnx
ex:
public static void main(String[]args){
a.method();
}
void method(){
System.out.println("print");
}
is 'method' a child thread or something like that,as it performs a task which is printing 'print'.or is 'main' method the only thread here?if so what is the difference between a thread and a method? Thnx