I am trying to create a new thread process, after thread process ends i want to get a result from that class.how can i do it?
For example this two classes. Lets say abThread class returns String array. How should I get those String values.
Class A{
public static void main(String[] args){
abThread bb=new abThread();
bb.start();
// when bb.run() returns data catch it
}
}
Class abThread extends Thread{
public void run(){
**// do smth here**
// then return result to the main Class
}
}