61.
Which of these lines of Java code will give better performance?
1. a | 4 + c >> b & 7; 
2. (a | ((( 4 * c ) >> b ) & 7 ))

62.
What will be the output of the following Java program?
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);
         }
    } 
}

65.
What is true about do statement?

66.
What will be the output of the following Java program?
class Output 
{
    public static void main(String args[]) 
    {    
         int a = 1;
         int b = 2;
         int c = 3;
         a |= 4;
         b >>= 1;
         c <<= 1;
         a ^= c;
         System.out.println(a + " " + b + " " + c);
    } 
}

70.
What will be the output of the following Java program?
class Output 
{
        public static void main(String args[]) 
        {    
           final int a=10,b=20;
          while(a<b)
          {
 
          System.out.println("Hello");
          }
          System.out.println("World");
 
        } 
}

Read More Section(Operators)

Each Section contains maximum 100 MCQs question on Operators. To get more questions visit other sections.