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

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

Naresh.K said:   1 decade ago
The final is a keyword. This is similar to const keyword in other languages. This keyword may not be used as identifiers i.e. you cannot declare.


Native is a Java keyword that is used in method declarations to specify.... This keyword signals to the Java compiler that the function is a native language.

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

Vishwanath said:   1 decade ago
Strictfp:.

A Java keyword used to restrict the precision and rounding of floating point calculations to ensure portability.

Praveen reddy said:   1 decade ago
Nag and swarna: native is a valid keyword used in java. It is used to declare the modify methods.

Swarna said:   1 decade ago
Siva: finally is a keyword, used along with try block. It is an optional block. The purpose is to close any opened connections within the program for security.

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

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

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


Post your comments here:

Your comments will be displayed after verification.