Multiple choice java

Which one of these lists contains only Java programming language keywords?

  1. class, if, void, long, Int, continue

  2. goto, instanceof, native, finally, default, throws

  3. try, virtual, throw, final, volatile, transient

  4. strictfp, constant, super, implements, do

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

All the words in option B are among the 49 Java keywords. Although goto reserved as a keyword in Java, goto is not used and has no function.Option A is wrong because the keyword for the primitive int starts with a lowercase i.Option C is wrong because "vi

AI explanation

goto, instanceof, native, finally, default, and throws are all reserved words in the Java language specification. goto is reserved even though it isn't used by any statement (it's kept to prevent people using it as an identifier, unlike C). The other lists mix in things that look like keywords but aren't: Int is capitalized (not a keyword — int is), and constant/virtual are not Java keywords at all (Java uses final, not constant or virtual).