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 is the main advantage of passing argument by reference?

0 Answers  


What is purpose of find feature?

0 Answers  


How to add panel to a Frame?

5 Answers  


How many unicode characters are there?

0 Answers  


HOW TO PRINT A NO IN WORDS USING WHILE LOOP THE NO WILL BE PRINTED WHEN IT WILL BE IN THE RANGE BETWEEN 1 AND 3?

1 Answers  


What are advantages and disadvantages of OOPs?

0 Answers   Amdocs,


explain the concept of virtual method invocation in polymorphism in detail?

0 Answers   TCS,


Why does java not support pointers?

0 Answers  


Explain the difference between runnable and callable interface in java?

0 Answers  


State two differences between C and Java.

0 Answers   Syntel, Visa,


What are the two ways of implementing multi-threading in java?

1 Answers  


How can you say HashMap is syncronized?

14 Answers   Arete, IBM,


Categories