string is immutable? right every one knows that, my
question is it advantage or disadvantage making string
immutable?
Answer Posted / payal gupta
It is an advantage that a String class is immutable because
almost all the standard classes use its methods, if they
were mutable, then the behaviour of other standard classes
and their methods would not have been consistent.
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is the use of list in java?
Explain the polymorphism principle?
What is use of map in java?
Explain about serializable interface in java?
What is java virtual machine? Explain
What is object-oriented paradigm?
How do you add an arraylist to an array in java?
What is exception propagation?
What is meant by anonymous class?
What is getclass () getname () in java?
Write a program to find the whether a number is an Armstrong number or not?
What is a vector in java?
What is string [] java?
What is the difference between arraylist and hashset in java?
Have you ever used hashtable and dictionary?