Sail E0 Webinar
Question
Consider the following program written in Java.
class Test{
public static void main(String args[]){
int x=7;
if(x==2); // Note the semicolon
System.out.println("NumberSeven");
System.out.println("NotSeven");
}
}
What would the output of the program be?
Options:
A .  NumberSeven NotSeven
B .  NumberSeven
C .  NotSeven
D .  Error
E .  7
Answer: Option A

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers