πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) 10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
66
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Praveen Singh
Publisher
πŸ“ˆ
88%
Success Rate