- // abstract class demonstration
- abstract class one
- {
- abstract void show1();
- void show2()
- {
- System.out.println("\nWelcome");
- }
- }
- class two extends one
- {
- void show1()
- {
- System.out.println("\nHave a Nice Day");
- }
- }
- class ssvAbstract1
- {
- public static void main(String arg[])
- {
- two t = new two();
- t.show1();
- t.show2();
- }
- }
In this program, easy to understand Abstract Class and Abstract Method in Java Program.
