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 |
How to find the index of the largest number in an arraylist java?
What is a J2EE component? List out all the component?
how to print a numbers from 1 to 100 with out using control structures?
Can we use string in the switch case?
How to find the size of an array a)array.length() b)array.length c)array.size() d)array.size
How to run a JAR file through command prompt?
what is deadlock? : Java thread
Tell me the latest versions in java related areas?
What is design pattern and there types?
Is java jre still free?
Give example to differentiate between call by value and call by reference.
This is related to threads. I have a class with synchronized method m1(). Can I create different instances of this class and execute the m1() for different threads?