Skip to content

Commit

Permalink
abstract demo: child class inheriteng parent & overriding abstract me…
Browse files Browse the repository at this point in the history
…thod
  • Loading branch information
NirmalSilwal committed Sep 4, 2020
1 parent 518c282 commit f69d49e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CodingBlocks Training/Day16/childAbstract.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package Lecture16;

public class childAbstract extends parentAbstract {

public int age = 20;

public void fun1() {
System.out.println("Inside child fun1");
}

// overriding parent class fun() as it is defined abstract, you need to
// provide it's implementation
public void fun() {
System.out.println("Inside child fun");
}

public void fun3() {
System.out.println("Inside child fun2");
}
}

0 comments on commit f69d49e

Please sign in to comment.