Java Programming - Language Fundamentals - Discussion

Discussion Forum : Language Fundamentals - General Questions (Q.No. 2)
2.
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
byte, break, assert, switch, include
Answer: Option
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.

Discussion:
64 comments Page 5 of 7.

Prashant said:   9 years ago
But goto is also used in C. So this is the wrong option.

Vishnu said:   9 years ago
When we use "volatile" and "transient" in Java?

Rashmi Upadhyay said:   1 decade ago
Please tell me the meaning of native language?

Ridhi said:   1 decade ago
Please tell me the use of native keyword.

Siva said:   1 decade ago
Is "finally" a keyword? where it is used?

Sarvesh said:   1 decade ago
Instanceof is a operator not a keyword. ?

Srinivas said:   2 decades ago
When we use strictfp and assert in java?

Padmashri said:   1 decade ago
When we use strictfp and assert in java?

Puri kiki said:   1 decade ago
"goto" have got what purpose in java?

Premchand said:   1 decade ago
Java has goto keyword but not in use.


Post your comments here:

Your comments will be displayed after verification.