Hi,
During my study of Multithreaded programming, I came across a statement which I want to understand properly. Please help me in understanding this statement.
"Runnable abstracts a unit of executable code."
Thanks a lot
Printable View
Hi,
During my study of Multithreaded programming, I came across a statement which I want to understand properly. Please help me in understanding this statement.
"Runnable abstracts a unit of executable code."
Thanks a lot
I don't know if this answer wud satisfy you, but to state very simply:
Runnable is an interface that u 'implement' in your class while writing thread programs. I'm sure, you must have the idea of an interface as u're studying multi-threaded programming where you can implement the Runnable interface whose instances are intended to be executed by a thread other than extending the thread class. So when u implement Runnable u're actually associating a "unit of executable code". But that unit of code is abstracted from u, and you just need to override the run() method as you might be aware of!
got that??.....