Share this post! | Vote this! |
|
In a single thread only one piece of work can be actioned at a time,
with multiple threads multiple tasks can be actioned at the same time. A
thread means two different things:
Just as we start from main( ) in an application program we always start from run( ) in a thread instance, you can define and instantiate a thread in one of two ways
- An instance of class java.lang.Thread
- A thread of execution
Just as we start from main( ) in an application program we always start from run( ) in a thread instance, you can define and instantiate a thread in one of two ways
- Extend the java.lang.Thread class
- Implement the Runnable interface more...
0 comments:
Post a Comment