Which of the following is a valid java keyword?
Advertisements
प्रश्न
Which of the following is a valid java keyword?
विकल्प
If
BOOLEAN
static
Switch
MCQ
Advertisements
उत्तर
static
Explanation:
Keywords in Java are reserved terms with a defined meaning and purpose within the language. Keywords should always be written in lowercase. Analyzing the provided options:
If:Incorrect because Java keywords are case-sensitive; the correct keyword is if (lowercase).BOOLEAN:Incorrect because the Java keyword is boolean (lowercase).static:This is correct; static is a valid Java keyword for declaring static methods, variables, or blocks.Switch:Incorrect since the right keyword is switch (lowercase).
shaalaa.com
Tokens
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
