Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IMPLEMENTING MULTIPLE INTERFACES WITH THE SAME DEFAULT METHOD NAMES
- interface Abc
- {
- default void abc(){
- System.out.println("abc");
- }
- }
- interface Xyz
- {
- default void abc(){
- System.out.println("xyz");
- }
- }
- class Def implements Abc,Xyz
- {
- public static void main(String[] args){
- System.out.println("Main method");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement