hi to all. well can you please tell me that why String class
is immutable?
Thanks in advance.
Answer Posted / hari
Well it is immutable because of the memory concern. For
every new string if there is new object then it will take
lot of memory and if there is such requirement then there
is StringBuffer class provided.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the file and randomaccessfile classes?
What are pass by reference and pass by value?
What modifiers may be used with an inner class that is a member of an outer class in java programming?
how are methods defined?
What technique is carried out to find out if a particular string is empty?
Explain about serializable interface in java?
What is a super method?
What is udp in java?
What are the object and class classes used for?
Write code to implement bubble sort in java?
What are triggers in DB? Explain their types. How do they work?
design an lru cache in java?
What are the new features in java 8? Explain
Define jre i.e. Java runtime environment?
What is the difference between throw and throws in java?