fork(3) download
  1. public class Main
  2. {
  3. private static int x = getValue();
  4. private static int y = 5;
  5. private static int getValue()
  6. {
  7. return y;
  8. }
  9. public static void main(String[] args)
  10. {
  11. System.out.println("x = " + x);
  12. System.out.println("y = " + y);
  13. }
  14. }
Success #stdin #stdout 0.06s 215552KB
stdin
Standard input is empty
stdout
x = 0
y = 5