package com.mastermoin.ICore;
public interface InterfaceOne {
void methodFromInterfaceOne();
}
package com.mastermoin.ICore;
public interface InterfaceTwo {
void methodFromInterfaceTwo();
}
________________________________________________________________________
package
com.mastermoin.ICore;
public abstract class AbstractDemo implements
InterfaceOne,InterfaceTwo{
@Override
public void
methodFromInterfaceOne() {
System.out.println("From
Interface One : implements in Abstract Class ");
}
}
package com.mastermoin.java;
import
com.mastermoin.ICore.AbstractDemo;
public class DemoRun extends AbstractDemo{
public static void main(String[] args) {
DemoRun
obj = new DemoRun();
obj.methodFromInterfaceOne();
obj.methodFromInterfaceTwo();
}
@Override
public void
methodFromInterfaceTwo() {
System.out.println("From
Interface Two & Abstract Class : Implements in DemoRun Class");
}
}
From Interface One : implements in Abstract Class
From Interface Two & Abstract Class : Implements in DemoRun Class
From Interface Two & Abstract Class : Implements in DemoRun Class
No comments:
Post a Comment