Java initializer block syntax

Damien Cassou damien.cassou at gmail.com
Tue Oct 9 15:23:54 UTC 2007


Hi,

I discovered that the following syntax is valid Java code:

class A {

  {
      /* any java code here */
  }

}


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?

-- 
Damien Cassou



More information about the Squeak-dev mailing list