What are the two ways of implementing multi-threading in java?
Answer Posted / hrindows@gmail.com
Multi threaded applications can be developed in Java by using any of the following two methodologies:
1. By using Java.Lang.Runnable Interface. Classes implement this interface to enable multi threading. There is a Run() method in this interface which is implemented.
2. By writing a class that extend Java.Lang.Thread class.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is java an open source?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
Can we call the run() method instead of start()?
What are void pointers?
What is hashtable and explain features of hashtable?
What are keywords give examples?
Explain how to force the garbage collection in java.
Can we rethrow the same exception from catch handler?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
can used Protected Class outside Function.?
What is meant by collection in java?
What is unmodifiable list in java?
How do you create immutable object in java?
How to provide security in java
Why does java have different data types for integers and floating-point values?