Java — Which of the following are Java reserved words? (run, import, default, implement)

Java Programming Objects and Collections Difficulty: Easy
Choose an option
  • A
    1 and 2
  • B
    2 and 3
  • C
    3 and 4
  • D
    2 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

Discussion & Comments
No comments yet. Be the first to comment!
Join Discussion