Blank Video Poster

Why is String immutable in java?

Sep 25, 2022

javagists.com

Strings are implicitly thread safe because of immutability. String Intern pool exists because the Strings it holds are immutable. Parameters are typically represented as String in network connections, database connection urls, usernames/passwords etc.