1. public class GoTest {2. public static void main(String[] args) {3. Sente a = new Sente(); a.go();4. Goban b = new Goban(); b.go();5. Stone c = new Stone(); c.go();6. }7. }8.9. class Sente implements Go {10. public void go() { System.out.println("go in Sente."); }11. }12.13. class Goban extends Sente {14. public void go() { System.out.println("go in Goban"); }15. }16.17. class Stone extends Goban implements Go { }18.19. interface Go { public void go(); }