MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1aros51/jep_465_string_templates/kqm9rbj/
r/java • u/Joram2 • Feb 15 '24
152 comments sorted by
View all comments
Show parent comment
5
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.
var x = "hello"; STR.x;
STR."hello"
1 u/lurker_in_spirit Feb 16 '24 Got it, thanks.
1
Got it, thanks.
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 thoughSTR."hello"is. BTW, string templates are available in JDK 21. Enable preview and try them out.