Difficulty: Easy
Correct Answer: Keyword
Explanation:
Introduction / Context:
Programming languages define a set of words that the compiler treats in a special way. In Java, some words cannot be used as user defined identifiers because they are reserved for the language syntax. Understanding the proper term for these words is basic knowledge but is still a common interview question.
Given Data / Assumptions:
Concept / Approach:
Reserved words in Java are called keywords. They express control flow, declarations, and other core language constructs. For example, class starts a class declaration, if starts a conditional, and static marks members that belong to the class rather than to instances. Java developers must avoid using keywords as identifiers to prevent compilation errors.
Step-by-Step Solution:
Verification / Alternative check:
Looking at the official Java language specification or any standard tutorial shows a section labeled \"Java keywords\" listing words such as abstract, boolean, and return. This confirms that the accepted term is keyword rather than variable or identifier.
Why Other Options Are Wrong:
Common Pitfalls:
Beginners sometimes confuse the idea of an identifier with a keyword and attempt to use reserved words as variable names. Another pitfall is forgetting that keywords are case sensitive; for example, While is not a keyword, but while is. This can lead to subtle bugs if naming conventions are inconsistent.
Final Answer:
The correct choice is Keyword because Java refers to its reserved language words as keywords, and they play a fixed role in the syntax.
Discussion & Comments