public class Simple{
int i;
{
i = 10;
System.out.println("i = " + i);
}
public static void main(
String[] args) {
new Simple();
}
}
--------------------------------------------
if remove "{}" of "i=10...", compile error,so
think the code in "{}" can be considerd as anonymous method which should never be called. But, the result print i = 10 , Who know
java how to deal with this situation?