Which one of these lists contains only Java programming language keywords?
-
class, if, void, long, Int, continue
-
goto, instanceof, native, finally, default, throws
-
try, virtual, throw, final, volatile, transient
-
strictfp, constant, super, implements, do
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
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).