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


Please Help Members By Posting Answers For Below Questions

What is the final blank variable?

784


What is constant in programming?

759


Is string a data type in java?

786


Why set do not allow duplicates in java?

760


Which class is the superclass of all classes?

817


What is a method in java?

718


What are the six ways to use this keyword?

819


How to create an interface?

820


What is the benefit of abstract class?

700


Difference between default and protected access specifiers?

723


What is exception propagation?

819


Difference between operator overloading and function overloading

814


Can you explain inner class.

819


What are the rules for naming an array?

717


How objects are stored in java?

745