Inheritance Access using Example in java
SOURCE : InhertanceAccess.javapublic class InhertanceAccess { public void eat() { System.out.println("inside eat"); } static class B extends InhertanceAccess { public void eat() { System.out.println("inside B"); } public static void main(String[] args) { InhertanceAccess hs = new B(); hs.eat(); } }}INPUTOUTPUTinside B

0 comments :
Post a Comment