Single Choice
Moderate
QIn Java, int x = 5; x is a:
ID: #25815
MCQ Quiz - Class 8 - Programming
5 views
Question Info
#25815Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - ProgrammingTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Correct Answer Explanation:
In 'int x = 5;', x is a variable of type int, holding the value 5. Its value can be changed later in the program.
Why the other options are incorrect:
- Option B: Constants (final int x = 5;) can't change; regular declarations create variables.
- Option C: 'int' is a keyword, but 'x' is the variable name.
- Option D: A class is a different concept — x is a simple variable.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic