Arnab_Manna

interface1.java

Nov 27th, 2021
815
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. interface A{
  2.     void a();
  3.     void b();
  4.     void c();
  5.     void d();
  6. }
  7.  
  8. abstract class B implements A{
  9.     public void c(){System.out.println("I am C");}
  10. }
  11.  
  12. class M extends B{
  13.     public void a(){System.out.println("I am a");}
  14.     public void b(){System.out.println("I am b");}
  15.     public void d(){System.out.println("I am d");}
  16. }
  17.  
  18. class Test5{
  19.     public static void main(String args[])
  20.     {
  21.         A a= new M();
  22.         a.a();
  23.         a.b();
  24.         a.c();
  25.         a.d();
  26.     }
  27. }
RAW Paste Data