Java initializer block syntax

Klaus D. Witzel klaus.witzel at cobss.com
Tue Oct 9 15:52:19 UTC 2007


On Tue, 09 Oct 2007 17:23:54 +0200, Damien Cassou wrote:

> Hi,
>
> I discovered that the following syntax is valid Java code:
>
> class A {
>
>   {
>       /* any java code here */
	 /* suffixed with .dll and .so for illustration: */
	System.loadLibrary("my.dll");System.load("your.so");
	/* otherwise some of your native methods [might] fail */
>   }
>
> }
>
>
> This code will be executed just before the constructor. I haven't
> found any use for this syntax, even in the case of subclasses.
>
> Does anyone have any idea or is it just useless?
>





More information about the Squeak-dev mailing list