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 the purpose of method overriding in java where v r completely re-defining a inherited method instead y can't v create a new method and define.If the question is very silly plz excuse me and do reply.Thank U!
7 Answers emc2, Kumaran Systems,
What is the meaning of 3 dots in java?
Which is not Object in Java?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
Can you pass functions in java?
How do constructors use this() and super()?
What is initial size of arraylist in java?
What are the access modifiers available in java?
Is there is any difference between a scrollbar and a scrollpane?
How do you add an element to an arraylist in java?
What are the interfaces defined by Java.lang package?
Java support what type of parameter passing ?