Strings and characters in Clojure are the same as in Java. String literals are implicitly interned. Interning is a way of storing only unique values in the heap and sharing the reference wherever required. Depending on the provider and the version of Java you use, the interned data may be stored in a string pool, Permgen, ordinary heap, or some special area in the heap marked for interned data. Interned data is subject to garbage collection when not in use, just like ordinary objects. Take a look at the following code:
user=> (identical? "foo" "foo") ; literals are automatically interned true user=> (identical? (String. "foo") (String. "foo")) ; created string is not interned false user=> (identical? (.intern (String. "foo")) (.intern (String. "foo"))) true user=> (identical? (str "f" "oo") (str "f" "oo")) ; str creates string false user=> (identical? (str "foo") (str "foo")) ; str does not create string for 1 arg true user=> (identical...