What is more advisable to create a thread, by implementing
a Runnable interface or by extending Thread class?

Answer Posted / abcd

Suppose ..you want to work with thread and also with a
class from AWT package.

java rule is that : YOu cannot extend more one class in
your program.

So it is adviseable to implement the runnable interface and
extend any other class which you desire....

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null a string in java?

552


What is the difference between arraylist and hashset in java?

514


What is collections framework?

571


Is array an object in java?

547


Why java doesn’t support multiple inheritances?

580






What is square root in java?

584


What is the meaning of nullable?

572


What are use cases?

558


Which is a valid identifier?

542


Is minecraft 1.15 out?

545


What is a treeset in java?

542


Can a class have multiple superclasses?

564


What is java util hashmap?

512


What are the three parts of a lambda expression? What is the type of lambda expression?

566


What is nan in java?

516