fork download
  1.  
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class Parentclass
  8. {
  9. Parentclass(){
  10. System.out.println("Constructor of Superclass");
  11. }
  12. }
  13. class Subclass extends Parentclass
  14. {
  15. Subclass(){
  16. super();
  17. System.out.println("Constructor of Subclass");
  18.  
  19. }
  20. public static void main(String args[]){
  21. Subclass obj= new Subclass();
  22.  
  23. }
  24. }
Success #stdin #stdout 0.03s 4386816KB
stdin
Standard input is empty
stdout
Constructor of Superclass
Constructor of Subclass