fork(2) download
  1. class A{
  2. int a;
  3. public A(int a){
  4. this.a=a;
  5. }
  6. public A(){}
  7. }
  8.  
  9. class B extends A{
  10. int b;
  11. public B(int b){
  12. // here automatically, "super();" will be executed. if it is not present, error!
  13. this.b=b;
  14. }
  15. }
  16.  
  17. class Main{
  18. public static void main(String args[]){
  19. System.out.println("hi");
  20. B b = new B(1);
  21. }
  22. }
Success #stdin #stdout 0.02s 245632KB
stdin
Standard input is empty
stdout
hi