JDK 21 |
---|
21Resolved |
String templates allow text and expressions to be composed without using the `+` operator. The result is often a string, but can also be an object of another type. Each string template has a template processor that validates the text and expressions before composing them, achieving greater safety than basic 'string interpolation' features in other languages.
|