Skip to content

Commit

Permalink
abstract keyword with class
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyushvishnoi authored Jan 16, 2020
1 parent 37dd9a8 commit 1716ed5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions keywords in java/abstractclassdemo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package tutorial;
abstract class first1
{
public abstract void eat();
}
class second extends first1
{
public void eat()
{
System.out.println("in class second");
}
}

public class abstractclassdemo {

public static void main(String[] args) {
first1 a=new second();
a.eat();

}

}

0 comments on commit 1716ed5

Please sign in to comment.