Question PRG-JAVA-0013
MediumWhy are Java Strings immutable?
- A.
For security, thread-safety and to allow safe sharing in the string pool
- B.
To make concatenation faster
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
Why are Java Strings immutable?
For security, thread-safety and to allow safe sharing in the string pool
To make concatenation faster
Sign up free to see the answer and a step-by-step explanation.
Because Java has no mutable objects
To use less memory per character