Why string is immutable with example?
Answer / Dharamveer
Strings in Core Java are immutable because once created, they cannot be modified. For example, when you assign a new value to a String using the += operator, it actually creates a new String object and discards the old one.
| Is This Answer Correct ? | 0 Yes | 0 No |
How is tree Mirroring implemented?
Is &&= a valid Java operator?
What is public static?
What restrictions are placed on method overriding in java programming?
What is a reflection package?
How many types of interfaces are there?
What is a file pointer?
Is main a function?
What is the definition of tree ?
What does string [] args mean?
Which are different kinds of source code?
What is math exp in java?