Java examples for Object Oriented Design:Field
Example of Using an Instance Initializer
public class Main { {/* w ww.j a v a2 s. c o m*/ System.out.println("Inside instance initializer 1."); } { System.out.println("Inside instance initializer 2."); } public Main() { System.out.println("Inside no-args constructor."); } public static void main(String[] args) { Main ii = new Main(); } }