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

Name few java.lang classes introduced with java 8 ?

622


What is the difference between hashmap and hashtable? What is an interface?

632


What is encapsulation in java?

715


What are the benefits of immutable objects?

630


What do you understand by final value?

682






What is the purpose of static methods and variables?

616


Can you explain the meaning of aggregation and composition

655


What is an abstract method in java programming?

679


How does a for loop work java?

646


is there a separate stack for each thread in java? : Java thread

626


Can we have two main methods in a java class?

628


Can a static method be final?

644


what is interface in java? Explain

629


What is the full name of java?

667


What is a generic code?

623