Java Programming - Language Fundamentals - Discussion
Discussion Forum : Language Fundamentals - General Questions (Q.No. 5)
5.
Which is a valid keyword in java?
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.
Palaniarjun said:
8 years ago
String is not a key word, String is one of the predefined class in java.
Kote said:
9 years ago
Can you explain about final keyword.
Vijaya said:
9 years ago
How many keywords are there in Java programming language?
Rajat said:
1 decade ago
Why string is a class type if I said it is Java type?
Anand said:
1 decade ago
What is a class type? Any example?
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?
Keyword and classtype are different right?
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.
This Float class is provided by The java itself then how Float is not keyword.
Sathish Kumar R said:
1 decade ago
Interface is a java type, it contains only abstract methods.
All interface methods by default abstract, public, non static. All interface variables by default final and static.
We can not create an instance of interface.
All interface methods by default abstract, public, non static. All interface variables by default final and static.
We can not create an instance of interface.
Raghu said:
1 decade ago
Difference between class and interface?
Pinky said:
1 decade ago
Interface is a type of class which have no body implementation.
It can be implemented to any user defined class using 'implements' and the methods declared in the interface are implemented in the class using an access specifier 'public'.
It can be implemented to any user defined class using 'implements' and the methods declared in the interface are implemented in the class using an access specifier 'public'.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers