Java — Which of the following are Java reserved words? (run, import, default, implement)
Java Programming
Objects and Collections
Difficulty: Easy
Choose an option
-
A1 and 2
-
B2 and 3
-
C3 and 4
-
D2 and 4
Answer
Correct Answer: 2 and 3
Explanation
Introduction / Context:This question checks memory of Java reserved keywords, which cannot be used as identifiers.
Concept / Approach:
- import → reserved word (used for package imports).
- default → reserved word (used in switch and interfaces).
- run → not reserved; just a common method name.
- implement → not reserved; correct word is implements.
Final Answer:2 and 3