Single Choice
Moderate
QChecking two numbers equal uses:
ID: #25954
MCQ Quiz - Class 8 - Decision Control Structure
2 views
Question Info
#25954Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - Decision Control StructureTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Correct Answer Explanation:
if(a==b) uses the equality operator == to compare two numbers.
Why the other options are incorrect:
- Option B: if(a=b) uses assignment, which is a common bug (compile error in Java).
- Option C: if(a
- Option D: Equality check is a valid operation.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic