how many ways to create Thread and which one is good?
runnable interface ot Thread class?

Answer Posted / guest

Two ways to create threads
1)by creating thread class
class classname extends Thread
{


}
2)By converting class to thread ie using Runnable interface

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by local variable and instance variable?

833


What is not object oriented programming?

712


Is the milky way in a void?

768


Will set allow duplicates in java?

739


What is the escape character in java?

743


Explain the use of sublass in a java program?

787


What is boolean keyword in java?

883


What about main() method in java ?

781


Tell me the latest versions in java related areas?

854


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

729


What are predefined functions?

819


What do you understand by abstract classes?

845


Why does abstract class have constructor?

775


What is the difference between preparedstatement and statement in java?

831


Is java still necessary?

848