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

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?

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.

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.

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.

Kunal said:   1 decade ago
The goto keyword is not available to the programmer that means the programmer can't use the goto keyword.

Mukesh meena said:   1 decade ago
Goto performs a one-way transfer of control to another line of code. Goto is not used and has no function.

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

Anu said:   1 decade ago
strictfp is a keyword in the Java programming language that restricts floating-point calculations to ensure portability. It was introduced into Java with the Java virtual machine (JVM) version 1.2.

Sanku said:   1 decade ago
Final is the keyword that which cannot be used as identifier.

Native is the word which the compiler is dependent on OS.


Post your comments here:

Your comments will be displayed after verification.