Language Fundamentals

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

A goto, instanceof, native, finally, default, throws

B try, virtual, throw, final, volatile, transient

C class, if, void, long, Int, continue

D byte, break, assert, switch, include

E strictfp, constant, super, implements, do

ANS:B - goto, instanceof, native, finally, default, throws

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 "virtual" is a keyword in C++, but not Java. Option D is wrong because "constant" is not a keyword. Constants in Java are marked static and final. Option E is wrong because "include" is a keyword in C, but not in Java.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.