About inheritance of java : <p>/**
 * Created by zhangzhongzheng on 2016/10/15.
 */</p>

<p>public class ExtendsTest {</p>

<pre><code>static Dog d = new Dog();

public static void main(String[] args) {
    Animal a = d;
    System.out.println(a instanceof Animal);//true
    System.out.println(a instanceof Dog);//true

    System.out.println(d instanceof Animal);//true
    System.out.println(d instanceof Dog);//true
}

static class Animal {

}

static class Dog extends Animal {

}
</code></pre>

<p>}</p>

<p>why all true??????</p>
