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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -