hi to all. well can you please tell me that why String class
is immutable?

Thanks in advance.

Answer Posted / rohit kumawat

String class actually kept immutable by developers of "Sun
microsytems" because of you use it in desktop application
not for mobile application where memory is short & less to
work

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are features of java?

562


How are multiple inheritances done in Java?

622


What are the important methods of java exception class?

575


What is the base class of all classes?

572


what is the major difference between linkedlist and arraylist in java?

554






What is java command?

574


What is default size of arraylist in java?

559


How to sort double array in java?

592


What do you understand by final value?

590


Difference between stack and queue?

590


Write a method that will remove given character from the string?

577


What is a method signature java?

577


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1025


What are some alternatives to inheritance?

563


How does arraylist work in java?

536