Guest User

Untitled

a guest
Apr 26th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. public class Main {
  2. public static void main(String[] args) {
  3. Parent p = new Parent();
  4. Parent c = new Child();
  5.  
  6. printName(p);
  7. printName(c);
  8. }
  9.  
  10. public static void printName(Parent p) {
  11. System.out.println(p);
  12. }
  13. }
Add Comment
Please, Sign In to add comment