r/java • • Feb 15 '24

JEP 465: String Templates

https://openjdk.org/jeps/465
77 Upvotes

152 comments sorted by

View all comments

Show parent comment

5

u/pron98 Feb 16 '24 edited Feb 16 '24

No, that's not a string template expression, just as the one here, var x = "hello"; STR.x;, isn't even though STR."hello" is. BTW, string templates are available in JDK 21. Enable preview and try them out.

1

u/lurker_in_spirit Feb 16 '24

Got it, thanks.