Can we extend the String class?
Answers were Sorted based on User's Feedback
Answer / om
No, we can not extend the String class b'coz it's a final
class...
if a class is final, it's not possible to perform
inheritance operation on that class
| Is This Answer Correct ? | 50 Yes | 4 No |
Answer / maurya
We can`t extends String class because java make it final
and thats why we say String in java are immutable.
final..
class--->can not inharitted.
method-->can not overridden
variable->its valu can not change after once initialized.
| Is This Answer Correct ? | 16 Yes | 3 No |
Answer / shashi shaw
no we cant.becoz string ia a immutable class.
| Is This Answer Correct ? | 6 Yes | 16 No |
What problems will occur when you don?t use layout managers?
What is reflexive association?
What is the middleware?
What is difference between add() and addelement() in vector?
What does @override mean?
Break statement can be used as labels in java?
Explain wrapper classes in java?
how to convert Java project into Maven ?
Can we override final method?
Is void a data type in java?
There are 2 classes, 1 LandAnimal and another WaterAnimal. There is another class Animal which wants to have the properties of both LandAnimal and WaterAnimal. How will you design this situation?
Which sorting is used in arrays sort in java?