Examveda
Examveda

What would be the output of the following code snippet if variable a=10?
if(a<=0)
{
   if(a==0)
   {
     System.out.println("1 ");
   }
   else 
   { 
      System.out.println("2 ");
   }
}
System.out.println("3 ");

A. 1 2

B. 2 3

C. 1 3

D. 3

Answer: Option D


This Question Belongs to Java Program >> Operators

Join The Discussion

Related Questions on Operators