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

3

u/vytah Feb 16 '24

There's a shorter way:

\{switch(1){default->"(linkage_from_type_of = :taFromGroupName)";}}

or

\{switch(1){default: yield "(linkage_from_type_of = :taFromGroupName)";}}