Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is output of following code
package r4r.co.in.core.java;

public class HelloWorld {
	static int i = 0;

	public static void main(String args[]) {

		new HelloWorld();
	}

	static {
		i = 10;
		System.out.println(i);
	}
}

This output of the above program :
    10