The code like that will compile and run without any problem. The reason is that you have a non-static free floating block. This mean it will only be executed when you invoke the constructor (before the constructor itself will be executed).
So if you add "new Testaaaac();" to your code or you make the free floating block a static one: static { ... }, you'll get your exception
The main
thread will also stop at that moment.