Strings

📝 Strings in Java In Java, a String is a sequence of characters. It is a widely used class for manipulating text. Strings are immutable, meaning once a string is created, its value cannot be changed. 🧠 String Characteristics Immutable Once a string object is created, its value cannot be modified. Any operation on a string creates a new string object. String Pool Java maintains a pool of strings to optimize memory usage. If the same string is created multiple times, the JVM reuses the string from the pool instead of creating a new one. String Length ...

May 8, 2025 · 2 min · Rohan