fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. private static class abc{
  11. int a = 0;
  12. static int b;
  13. public abc() {
  14. System.out.println("cons");
  15. }
  16. {
  17. System.out.println("ini");
  18. }
  19. static {
  20. System.out.println("stat");
  21. }
  22. static abc h = new abc();// former line 4
  23.  
  24. }
  25.  
  26. public static void main (String[] args) throws java.lang.Exception
  27. {
  28. System.out.println(new abc().a);
  29. }
  30. }
Success #stdin #stdout 0.07s 381184KB
stdin
Standard input is empty
stdout
stat
ini
cons
ini
cons
0