java - Diffrence between Runnable interface and Thread class realting Callstack -
i know basic difference between runnable
interface , thread
class in java.
but, there difference related callstack between two?
difference if extend thread class, wont able extend else, can pretty call start() method class since inherited. (dont forget override run() method).
mythreadclass t = new mythreadclass(); t.start();
another difference if implement runnable, can extend class if want, need pass object parameter able run since implement run() method.
thread t = new thread(new myrunnableclass()); t.start();
besides that, there isnt difference on how executed.
edit: dont understand mean "callstrack".
Comments
Post a Comment