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 are assertions in java?
What is a lock or purpose of locks in java?
What is nextline method in java?
Why javac is not recognized?
What is passing by reference in java?
What is the basic difference between string and stringbuffer object?
Write a program to find the greatest of three numbers in java?
Is null false in java?
Difference between arraylist and vector.
What are different data types?
What is static import?
How does java pattern compile work?