Foros del Web » Programando para Internet » Javascript »

Initialization block in JAVA

Estas en el tema de Initialization block in JAVA en el foro de Javascript en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 11/06/2008, 05:38
 
Fecha de Ingreso: junio-2008
Mensajes: 2
Antigüedad: 15 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
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:19.