Advertisement
JeffGrigg

Dash Simi‎ Question

May 10th, 2017
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.35 KB | None | 0 0
  1. //IMPLEMENTING MULTIPLE INTERFACES WITH THE SAME DEFAULT METHOD NAMES
  2. interface Abc
  3. {
  4.     default void abc(){
  5.         System.out.println("abc");
  6.     }
  7.  
  8. }
  9.  
  10. interface Xyz
  11. {
  12.     default void abc(){
  13.         System.out.println("xyz");
  14.     }
  15.  
  16. }
  17.  
  18. class Def implements Abc,Xyz
  19. {
  20.     public static void main(String[] args){
  21.         System.out.println("Main method");
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement