waltermilner

Untitled

Sep 29th, 2015
178
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.  
  3.   void m(); // one idea
  4. }
  5.  
  6. interface B {
  7.  
  8.   void m(); // different idea
  9. }
  10.  
  11. class A_Doer implements A
  12. {
  13.   public void m() {};
  14. }
  15.  
  16. class B_Doer implements B
  17. {
  18.   public void m() {};
  19. }
  20.  
  21. public class Test {
  22.   A_Doer a = new A_Doer();
  23.   B_Doer b = new B_Doer();
  24.  
  25.   public static void Test (String[] args) {
  26.     Test test = new Test();
  27.     test.a.m();
  28.     test.b.m();
  29.   };
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment