String Pool

Noun · Development

Definitions

  1. A memory region (most notably in the JVM) where string literals are interned so that identical string values share a single object reference, reducing heap usage and enabling fast reference-equality comparisons via `==` for interned strings.

    In plain English: A shared storage area where the system keeps one copy of each unique text value, so identical strings don't waste memory by being stored multiple times.

    Example: "Both variables point to the same object because the JVM's string pool interns identical literals automatically."

Related Terms