Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //A simple abstruct class
- abstract class A{
- abstract void callme();
- void callmetoo(){
- System.out.println("this is an concrete method.");
- }
- }
- class B extends A{
- void callme(){
- System.out.println("B's implementaton of callme .");
- }
- }
- class AbsractDemo{
- public static void main(String agrs[]){
- A b=new B();
- b.callme();
- b.callmetoo();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement