public class A { } public class B extends A { } public class C extends B { } public class D extends C { }