ariestamirra

childd

May 14th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1. public class Child extends Parent {
  2.  
  3.     public void method1() {
  4.  
  5.         System.out.println("Child's method1()");
  6.     }
  7.  
  8.     public static void main(String args[]) {
  9.         Parent p = new Child();
  10.         p.method2();
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment