package com.study; public class StaticCode { static { i = 33;// i's value is from 0 to 33 g(); } static int i = 1;// i's value is from 33 to 1 static String prior = "prior"; static String last = f() ? g() : prior; static boolean f() { return i == 1;//i's value is from 1 to 3 } static String g() { i = 3; return "g"; } public static void main(String[] arg) { System.out.println(last); //g System.out.println(i); //3 } }