Programming Languages Java Objective
Jan 02, 2013

Consider the following code:

 

 public class Solvemyques{
    public static void main(String[] args) {
         {
             static int x=10;
         }
         {
             int x=15;
             x=++x;
         }
         System.out.println(x);
    }
}

 

What will be the output?

Choose the correct answer:
A) 10
B) 11
C) 15
D) 16
Detailed Explanation

No explanation available.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback