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:
63 comments Page 5 of 7.

Sreedhar said:   1 decade ago
What is the use of goto keyword in java?

If there is no use then why they included this as keyword.

Vaibhav Kotiyal said:   1 decade ago
Native Keyword indicate That the method is written in Platform dependent language Such As C.

We can Say that if we want to use method that is written in another Language and we wanna to use then native keyword overcome this problem.

Kotiyal said:   1 decade ago
The 'final' is a keyword in Java. After using this keyword on class we can't extend that class and on variable we can't change the value of that variable.

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

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

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

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.

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.

Vishwanath said:   1 decade ago
Strictfp:.

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

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


Post your comments here:

Your comments will be displayed after verification.