Why are strings immutable in Java?
Strings in java are frequently used for hashmap keys. Now if someone changes the value of the string it will cause severe discrepancies. Hence strings are made immutable.
| Is This Answer Correct ? | 0 Yes | 0 No |
What releases of Java technology are currently available? What do they contain?
How do you check if a string is lexicographically in java?
What are the major advantages of internal iteration over external iteration?
Is final static java?
What is the GregorianCalendar class?
Without creating a new object, How you can retrieve a String or other object?
Can we sort a map in java?
How do you sort in ascending order in java?
What is inner class?what is the use of inner class?where we create the object for inner class? and inner class can extend any class or inner class can implement any interface?
What are three ways in which a thread can enter the waiting state in java programming?
How to perform selection sort in java?
What is difference between next () and nextline () in java?