P

Praveen Singh • 36.81K Points
Coach

Q. What will be the output of the following Java program?

Code:
class Output 
{
    public static void main(String args[]) 
    {    
         int a = 5;
         int b = 10;
         first: 
         {
            second: 
            {
               third: 
               { 
                   if (a ==  b >> 1)
                       break second;
               }
               System.out.println(a);
            }
            System.out.println(b);
         }
    } 
}
  • (A) 5 10
  • (B) 10 5
  • (C) 5
  • (D) 10
  • Correct Answer - Option(D)
  • Views: 19
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics