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

What is lexicographically smallest string?

596


What is a prefix function.write down a code to compute prefix function.

534


What is a blocking method in Java?

601


Can you add null to a list java?

583


What do you understand by java?

561






Which java ide is used the most?

505


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

542


What are different data structures in java?

528


What are the legal operands of the instanceof operator?

556


Does anyone still use java?

579


What methodology can be employed to locate substrings inside a string?

524


Can a set contain duplicates?

515


Does substring start with 0?

550


Is nan false?

531


Is it possible for a yielded thread to get chance for its execution again?

507