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); } }

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  

By:Jalees
Date:2016-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher