waltermilner

Untitled

Jul 26th, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. public class Test  {
  2.  
  3.   public static void main(String[] d) {
  4.     Sub s = new Sub('a');
  5.    
  6.   }
  7. }
  8.  
  9. class Base
  10. {
  11.   Base()
  12.   {
  13.     System.out.println("Base constructor called");
  14.   }
  15. }
  16.  
  17. class Sub extends Base
  18. {
  19.   Sub(){};
  20.   Sub (int x) {}
  21.   Sub(char c){};
  22. }
Advertisement
Add Comment
Please, Sign In to add comment