class Example8 { final int THRESHOLD = 5; // a blank final variable final int CAPACITY; // another blank final variable final int MINIMUM; // a final static variable PI // direct initialize static final double PI = 3.141592653589793; // a blank final static variable static final double EULERCONSTANT; // instance initializer block for // initializing CAPACITY { CAPACITY = 25; } // static initializer block for // initializing EULERCONSTANT static{ EULERCONSTANT = 2.3; } // constructor for initializing MINIMUM // Note that if there are more than one // constructor, you must initialize MINIMUM // in them also public Example8() { MINIMUM = -1; System.out.println("MINIMUM ="+MINIMUM); } public Example8(int x) { MINIMUM = x; } public static void main(String[] arg){ System.out.println("PI="+PI); System.out.println("EULERCONSTANT =" +EULERCONSTANT); Example8 e = new Example8(); Example8 e1 = new Example8(54); System.out.println("MINIMUM ="+e.MINIMUM); System.out.println("MINIMUM ="+e1.MINIMUM); System.out.println("CAPACITY ="+e.CAPACITY); System.out.println("THRESHOLD ="+e.THRESHOLD); final int i; // Now initializing it with integer value i = 20; // Printing the value on console System.out.println(i); } }