Advertisement
syntax1993

Untitled

Nov 1st, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. interface A {
  2.     public String Foo();
  3.     public String Bar();
  4. }
  5.  
  6. Class B implements A {
  7.     @Override
  8.     public String Bar() {
  9.         System.out.print("Hello from ");
  10.     }
  11.  
  12.     @Override
  13.     public String Foo() {
  14.         System.out.print("B");     
  15.     }
  16. }
  17.  
  18. Class C implements A {
  19.     @Override
  20.     public String Bar() {
  21.         System.out.print("Hello from ");
  22.     }
  23.  
  24.     @Override
  25.     public String Foo() {
  26.         System.out.print("C");     
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement