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:
62 comments Page 3 of 7.

Srinivas said:   1 decade ago
What is the meaning of "final" in java, when we need 'final', is 'final' is a key word in java.

Frillo said:   1 decade ago
Java has a "reserved word" called goto, but it's not a keyword since it is not used.

Vishesh said:   1 decade ago
None of the option is correct. Given answer B having goto is keyword of both Java and C.

Satya said:   1 decade ago
Can you give explanation about "program driven languages" and "event driven languages"?

Pavithra said:   4 years ago
In Java, we use the goto keyword when we write "labelled break " to break for loops.
(1)

Sum said:   10 years ago
Include is not a keyword in C. It is not in the list of words of 32 keywords of C.

Pradip said:   1 decade ago
Can you tell me? why we are not use goto keyword if it is there in java language?

Jayesh said:   8 years ago
If instances of, native are keywords then when we use in our Java programs.

Rakesh said:   5 years ago
In java there is no "goto" statement. Then how is the option B is correct.

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


Post your comments here:

Your comments will be displayed after verification.