I have the following simple hello world in Java:
class A { static { System.out.println(\"Hello world\"); } }
It works as ex
Forget the static block, and do it like this:
static
public static void main(String[] args) { System.out.println("Hello, world!"); }