Which of the following is a valid java keyword?

ICSE Class 10 Computer Applications PYQ · 2025 Specimen · Section A

1(v)1 Mark · 2025 · Section A · 2025 Specimen

Which of the following is a valid java keyword?

Show SolutionHide Solution↓

static

Reason — In Java, keywords are reserved words that have a specific meaning and purpose in the language. Keywords must always be written in lowercase. Analysing the given options:

  1. If: Incorrect because Java keywords are case-sensitive, and the correct keyword is if (in lowercase).
  2. BOOLEAN: Incorrect because the keyword in Java is boolean (in lowercase).
  3. static: Correct. static is a valid Java keyword used to declare static methods, variables, or blocks.
  4. Switch: Incorrect because the correct keyword is switch (in lowercase).
← Previous questionNext question →

Browse the free Computer Applications sample bank