Curious!!
Since String objects in Java are immutable while StringBuilder and StringBuffer are mutable, how does immutability work when a String is created as a literal compared to using new String()? Also, why does StringBuilder initialize with a default capacity of 16 characters?
4
2 comments
Hammed Lawal
2
Curious!!
Amigoscode
skool.com/amigoscode
A free learning community led by Nelson Djalo. Master Programming & AI, get updates, and grow in a fast-moving industry.
Leaderboard (30-day)
Powered by