Thread question

Can a thread return a string array ?
[43 byte] By [@debuga] at [2007-11-27 3:21:55]
# 1
i think it cant because execution of a new thread begins at run() method and run cannot return anything
gaurav_xmla at 2007-7-12 8:24:40 > top of Java-index,Java Essentials,New To Java...
# 2
I am not even sure what you are trying to ask here, could you please describe a little bit what your intentions are?
kilyasa at 2007-7-12 8:24:40 > top of Java-index,Java Essentials,New To Java...
# 3
can the Thread class return a string array? nocan an object that's running in a thread return a string array? yes. all code is executed within a thread, whether you create that thread yourself or not
georgemca at 2007-7-12 8:24:40 > top of Java-index,Java Essentials,New To Java...
# 4

interface TheadResultTarget {

void heresTheResultSquire(Object result);

}

class Runner extends Runnable {

private TheadResultTarget target;

public (TheadResultTarget target) {

this.target = target;

}

public void run() {

...

target.heresTheResultSquire(...);

}

}

Look in package java.util.concurrent for standard definitions, implementations and more.

DrLaszloJamfa at 2007-7-12 8:24:40 > top of Java-index,Java Essentials,New To Java...