Single Choice
Not Set
QConsider 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?
ID: #2139
Java Control Flow
1,260 views
Question Info
#2139Q ID
Not SetDifficulty
Java Control FlowTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
NumberSeven NotSeven
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic