Introduction
Freezing a string stops it from being changed. This helps keep data safe and avoids mistakes.
When you want to keep a string value the same throughout your program.
When sharing a string between parts of a program and want to prevent accidental changes.
When using strings as keys or constants that should not be modified.
When you want to improve performance by avoiding duplicate string objects.