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 final access modifier in java?

0 Answers  


Explain about interthread communication and how it takes place in java?

0 Answers  


How do you compare two strings? any predefined method for this?

3 Answers  


Can a string be null?

0 Answers  


What is void in java?

0 Answers  


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

0 Answers  


How do you compare values in java?

0 Answers  


What are the allowed, non-Unicode letter characters that can be used as the first character of an identifier?

2 Answers  


What is a function argument in java?

0 Answers  


What do you understand by weak reference?

0 Answers  


Wha is the output from system.out.println(“hello”+null); ?

0 Answers  


What is the full name of java?

0 Answers  


Categories