The following code gives a compiler error saying return inside static initializer. But there are no static initializers in the code!
<pre>
public class
test {
int i;
{
int i = 1;
if (i==2) return;
else i = 2;
}
public static void main(
String[] args) {
new test();
}
}
</pre>
I assume this is a case of incorrect diagnostics. Should have said instance initializer instead of static initializer! I am using JDK 1.2 on Win 98.