Java Programming - Language Fundamentals - Discussion

Discussion Forum : Language Fundamentals - General Questions (Q.No. 5)
5.
Which is a valid keyword in java?
interface
string
Float
unsigned
Answer: Option
Explanation:

interface is a valid keyword.

Option B is wrong because although "String" is a class type in Java, "string" is not a keyword.

Option C is wrong because "Float" is a class type. The keyword for the Java primitive is float.

Option D is wrong because "unsigned" is a keyword in C/C++ but not in Java.

Discussion:
26 comments Page 2 of 3.

Panchi said:   1 decade ago
Keywords are the reserve words and Float is the wrapper class for float type.

This Float class is provided by The java itself then how Float is not keyword.

Alex said:   1 decade ago
Why interface calling valid keyword?
(1)

Jodha said:   1 decade ago
@Pinky said interface is a type of class. So how can interface be a valid keyword?

Keyword and classtype are different right?

Bala said:   1 decade ago
Why unsigned not used in java?

Rajat said:   1 decade ago
Why string is a class type if I said it is Java type?

Saurabh said:   1 decade ago
String is a keyword.
(1)

Vijaya said:   9 years ago
How many keywords are there in Java programming language?

Kote said:   9 years ago
Can you explain about final keyword.

Brandon ceasar said:   8 years ago
@Vijaya.

About 49 keywords.
(1)

Palaniarjun said:   8 years ago
String is not a key word, String is one of the predefined class in java.


Post your comments here:

Your comments will be displayed after verification.