Which of the following is NOT listed as a Java keyword in the Java Language…
2025
Which of the following is NOT listed as a Java keyword in the Java Language Specification?
Answer: D. include — ConceptProgramming-language keywords are reserved lexical tokens; they are not merely a list of features that the language implements as executable…
- A.
goto
- B.
interface
- C.
volatile
- D.
include
Attempted by 293 students.
Show answer & explanation
Correct answer: D
Concept
Programming-language keywords are reserved lexical tokens; they are not merely a list of features that the language implements as executable statements.
A token may be reserved to prevent its use as an identifier even when the language provides no statement that executes that token.
Application
Section 3.9 of the Java Language Specification lists goto, interface, and volatile among the keywords. The same section explains that goto is reserved but currently unused. include does not appear in the exhaustive list; Java uses an import declaration to make named types and packages available.
Contrast
goto — reserved by Java, although no goto statement is implemented.
interface — declares an interface type.
volatile — modifies a field whose value may be shared across threads.
include — belongs to source-inclusion terminology used by other language toolchains, not to Java’s keyword list.
Cross-check
Comparing all four tokens with the specification’s complete keyword list leaves only include without an entry. Therefore, the required value is include.