MCQ Single Best Answer Not Set

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

ID: #1983 Java Language Fundamental 12,337 views
Question Info
#1983Q ID
Not SetDifficulty
Java Language FundamentalTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A class, if, void, long, Int, continue
  • B goto, instanceof, native, finally, default, throws
  • C try, virtual, throw, final, volatile, transient
  • D strictfp, constant, super, implements, do
Correct Answer: Option B

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 "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.

Share This Question

Challenge a friend or share with your study group.