fork(1) 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. static abc h = new abc();//line 4
  14. public abc() {
  15. System.out.println("cons");
  16. }
  17. {
  18. System.out.println("ini");
  19. }
  20. static {
  21. System.out.println("stat");
  22. }
  23. }
  24.  
  25. public static void main (String[] args) throws java.lang.Exception
  26. {
  27. System.out.println(new abc().a);
  28. }
  29. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
ini
cons
stat
ini
cons
0