You've actually seen one instance of another class hierarchy that also serves as a good illustration of the idea of extension by subclassing.
你已经看到了另一个类层次的实例,它很好的阐明了子类化的概念。
A class that implements Runnable can run without subclassing Thread by instantiating a Thread instance and passing itself in as the target.
实现Runnable的类可以不继承Thread而实例化为Thread实例,将自身作为运行目标。
应用推荐