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 toarray method in java?

0 Answers  


How many types of methods are there?

0 Answers  


If a method is declared as protected, where may the method be accessed?

0 Answers  


What is jdbc api?

0 Answers  


What is the difference between throw and throws in java?

0 Answers  






What is the technique adopted to create an immutable class?

0 Answers  


What are the topics in core java?

0 Answers  


What is identifier give example?

0 Answers  


What is variable explain?

0 Answers  


Which class is extended by all other classes?

4 Answers  


What is functional interface in java example?

0 Answers  


What is a jit compiler?

0 Answers  


Categories