Programming Languages Java Objective
Jan 02, 2013

Consider the following code:

 

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

 

What will be the output?

Choose the correct answer:
A) 30
B) 35
C) 20
D) 45
Detailed Explanation

No explanation available.

Discussion (0)

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

Share Your Thoughts
Feedback