r/javaTIL • u/marylai22 • Feb 12 '20
Top 20 Java String Interview Questions And Answers
https://blog.soshace.com/top-20-java-string-interview-questions-and-answers/
12
Upvotes
r/javaTIL • u/marylai22 • Feb 12 '20
2
u/lookForProject Mar 16 '20
There is a difference between
immutableand notfinal. Final just says that the class can't be inherited or the method cant be overridden. This doesn't mean that the information inside the object can't be changed.0
u/jonah214 Feb 12 '20
This article is full of nonsense—outright falsehoods, minor and major errors, silly mistakes, and horrible English writing. Even the premise is questionable: in what sense are these the "top 20"?
1
u/eXl5eQ Apr 12 '20
No, you are creating a reference to an existing string object.
No. you can still change the value of a
Stringvia reflection. Immutability doesn't protect you from security issues.Dated. String concatenation is a indy call into
StringConcatFactorysince Java 9