Can we extend the String class?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between Array and Hash Table?

549


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1609


What is the difference between class forname and new?

552


What is the difference between iterator and list iterator?

536


Describe different states of a thread.

580






What are the advantages of arraylist over arrays?

572


How many bytes is string in java?

614


How to display names of all components in a Container?

2491


What does you mean in math?

539


What is the maximum size of hashmap in java?

541


what invokes a threads run() method? : Java thread

575


Is this valid in java ? Can we instantiate interface in java?

550


Can we have multiple public classes in a java source file?

560


What is a constructor, constructor overloading in java?

532


What method is used to specify a container's layout in java programming?

546