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

Answer Posted / balaji@cse@crr engg@eluru

types of creating thread
1)extend thread class
2)implement by runnable interface
=>2"nd method is good because by using interface we can
implement multiple inheritance

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is singleton thread safe in java?

760


How many bits is a boolean?

827


What is final method in java?

767


What do you mean by light weight and heavy weight components?

779


What is bifunction in java?

911


Why java is call by value?

801


What is valid keyword in java?

774


What is finally block?

773


Can a class extend 2 classes in java?

805


What is the difference between the font and fontmetrics classes in java programming?

730


What will happen to the exception object after exception handling?

802


Explain method local inner classes ?

814


What is the difference between multitasking and multithreading in Java

988


define polymorphism in java

866


What are the types of arrays in java?

842