## Notes - `String myString = "foo";` - String literal; stored in the string constant pool - `String myString = new String("bar");` - Creates object in Heap because it uses object creation - Use `.intern()` to add a String to the String pool - Strings are immutable: `s.contact("thing")` returns new string; original string is unmodified - `CharSequence` is an interface that describes behaviors such as `.length()`, `.charAt()`, `subSequence()` ## Synchronizations - StringBuffer is thread-safe - StringBuilder is not thread-safe ## Why Immutable - Memory efficient: can have multiple references point to the same string - Thread-safe - Hashcode: ensures that hashcode is consistent ## References - [String in Java - Geeks for Geeks](https://www.geeksforgeeks.org/java/strings-in-java/)