why Runnable interface is preferable than extending the
Thread class?

Answer Posted / rameshkrishna

imolimen Runnabule inerface and extends Thread functionally
both are same.But implimenting RunnebleInterface more
advantage because of there is possibility extends more then
one class and also we can override run() only once.

Is This Answer Correct ?    10 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?

562


What are the two parts of a conditional statement?

524


Discuss 2D arrays.

614


Can we override data members in java?

638


what are the methods in object?

645






what is the difference between a threads start() and run() methods? : Java thread

538


Can private method static?

479


Explain differences between collection api and stream api?

619


What is parsing and its types?

591


Why pointers are not used in java?

594


What do you mean by compiler?

589


Explain about instanceof operator in java?

622


What is e java?

567


What is boolean example?

537


What is a map? What are the implementations of map?

582