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 4 of 7.

Nag said:   1 decade ago
Can anybody explain strictfp and assert and Instanceof " & "Native".

Arul said:   1 decade ago
What is the use of instance & native keyword? can you give example?

Manish mrityunjay said:   9 years ago
The answer should be A because goto is a key word but not use in java.

Disha said:   2 decades ago
But could you please tell me why "goto" keyword is not in use in java.

Vipul said:   8 years ago
Goto is a keyword in java and c/c++. So how it is java only keyword?
(2)

Kirankumar said:   1 decade ago
Sir goto is a keyword of C not keyword of Java right (or) wrong?

Sudeshna Sarkar said:   9 years ago
Is it necessary to know all the names of the 49 java keywords?

Ravindra said:   1 decade ago
What is the actual use of virtual? Can you tell me something.

Bharat said:   1 decade ago
What is use of "Instanceof"&"Native".

Mukesh said:   9 years ago
c++ use goto as well. So how could option (b) is correct?
(1)


Post your comments here:

Your comments will be displayed after verification.