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 1 of 3.
Abhishek Raj said:
1 year ago
"Float" is a valid keyword in Java.
(1)
Brandon ceasar said:
8 years ago
@Vijaya.
About 49 keywords.
About 49 keywords.
(1)
Alex said:
1 decade ago
Why interface calling valid keyword?
(1)
Saurabh said:
1 decade ago
String is a keyword.
(1)
Bala said:
1 decade ago
Why unsigned not used in java?
Jaya surya said:
2 years ago
String is an java data type and immutable in nature.
Ramzan Ali said:
4 years ago
@Kote.
Final keyword is used for variable, method, and class for restrictions purposes.
1. When we declare any variable as final then we can not change the value of that variable.
2. If we declare any method as a final then we can not override that method.
3. If we declare a class as a final then we can not inherit that class.
Final keyword is used for variable, method, and class for restrictions purposes.
1. When we declare any variable as final then we can not change the value of that variable.
2. If we declare any method as a final then we can not override that method.
3. If we declare a class as a final then we can not inherit that class.
Harsh thakkar said:
6 years ago
Float is also valid because it is wrapper class.
Harsh thakkar said:
6 years ago
Float is also valid because it is wrapper class.
San said:
7 years ago
@Kote.
The final keyword can be used for both classes & methods.
A final class cannot be extended.
A final method cannot be overridden.
Math class, StringBuilder, StringBuffer are examples for final classes.
Constants are final.
The final keyword can be used for both classes & methods.
A final class cannot be extended.
A final method cannot be overridden.
Math class, StringBuilder, StringBuffer are examples for final classes.
Constants are final.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers