Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/06/2008, 05:38
princech
 
Fecha de Ingreso: junio-2008
Mensajes: 2
Antigüedad: 16 años, 10 meses
Puntos: 0
De acuerdo Initialization block in JAVA

An initialization block is a block of code between braces that is executed before the object of the class is created. As the execution of the initialization block is dependent on the creation of the object we can easily make a guess that it has two types of object.

1. Non static initialization block.

It is dependent on the object and the initialization block is executed for each object of the class that is created. It can initialize instance member variables of the class. Here is a simple example.

click here to get code