Java Programming (3350703) MCQs

MCQs of Building Blocks of the Language

Showing 51 to 51 out of 51 Questions
51.

What will be the output of following code?  

class demo
{
   public static void main(String[] args) 
   { 
      int i = 0; 
      for (System.out.println(""Hello""); i < 1; i++) 
         System.out.println(""Welcome""); 
   }
}

નીચે આપેલ કોડ નું આઉટપુટ શું આવશે?

class demo
{
   public static void main(String[] args) 
   { 
      int i = 0; 
      for (System.out.println(""Hello""); i < 1; i++) 
         System.out.println(""Welcome""); 
   }
}
(a)

Hello

Welcome

(b)

Welcome

(c)

No output

આઉટપુટ નહિ આવે

(d)

Compilation error

કમ્પાઈલેશન એરર

Answer:

Option (a)

Showing 51 to 51 out of 51 Questions