Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which one of the following statements about the relationship between Thread and Runnable is true?

  • A.Thread itself implements Runnable.
  • B.Thread and Runnable are unrelated types.
  • C.Thread extends Runnable.
  • D.Runnable extends Thread.

Answer: A

Thread declares that it implements Runnable, so it satisfies the interface and can legally be handed to another Thread's constructor. Runnable declares only run(); start() belongs to Thread alone, which is why a Runnable cannot be started on its own.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.