Can we extend the String class?

Answers were Sorted based on User's Feedback



Can we extend the String class?..

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

Can we extend the String class?..

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

Can we extend the String class?..

Answer / shashi shaw

no we cant.becoz string ia a immutable class.

Is This Answer Correct ?    6 Yes 16 No

Post New Answer

More Core Java Interview Questions

What are adapter classes?

0 Answers  


What is super keyword in java ?

1 Answers  


how can i use a nonsynchronized hashtable?

0 Answers   CoreObjects,


why java is platform independent?

5 Answers   IBM, SparkTG,


what models are available for event handling?

1 Answers  






what is the diff b/w arraylist and vector?

6 Answers   Code Genesis, Genesis, Sprintine Labs,


Distinguish between a predicate and a function?

0 Answers  


What does java final mean?

0 Answers  


Is integer passed by reference in java?

0 Answers  


Does any tag exists in HTML to upload and download files ?

3 Answers  


what is difference between Action messages and Action errors?

3 Answers   Bio Imagene, TCS,


Why is a constant variable important?

0 Answers  


Categories