Interface inheritance in Java
iNewCustomer.java
interface iNewCustomer { void registration(); }
iOnlineCustomer.java
interface iOnlineCustomer extends iNewCustomer { void paymentMode(); }
online.java
class online implements iOnlineCustomer { public void registration() { System.out.println("Online customer can register by email"); } public void paymentMode() { System.out.println("Online customer can make payment by internet banking"); } public static void main(String args[]) { online obj = new online(); obj.registration(); obj.paymentMode(); } }
Output