interface Downloadable { public void download(); } interface Readable extends Downloadable { // line nl public void readBook(); } abstract class Book implements Readable { // line n2 public void readBook() { System.out.println("Read Book"); } } class EBook extends Book { // line n3 public void readBook() { System.out.println("Read E-Book"); } }
Book book1 = new EBook(); boook1.readBook();