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 is toarray method in java?
How many types of methods are there?
If a method is declared as protected, where may the method be accessed?
What is jdbc api?
What is the difference between throw and throws in java?
What is the technique adopted to create an immutable class?
What are the topics in core java?
What is identifier give example?
What is variable explain?
Which class is extended by all other classes?
What is functional interface in java example?
What is a jit compiler?