fork download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. class X {
  7.  
  8. }
  9. X x;
  10. public Main(X x) {
  11. this.x = x;
  12. }
  13. public Main(String s) {
  14. this(this.new X());
  15. }
  16. public static void main (String[] args) throws java.lang.Exception
  17. {
  18. Main main = new Main("");
  19. }
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:14: error: cannot reference this before supertype constructor has been called
        this(this.new X());
             ^
1 error
stdout
Standard output is empty