Are string templates supported yet?


Hi all, 

I'm trying to play around with String Templates under JDK 21 using IntelliJ IDEA 2023.2.1 (Ultimate Edition)

I tried setting this on project and module level and added it to maven pom file.

String name = "moo";
String message = STR."Greetings \{name}!";  //Java

java: string templates are a preview feature and are disabled by default.
 (use --enable-preview to enable string templates)

I notice we don't have 21 yet in the language level selection.  I guess it's still not ready?




1 comment

Hello, support for java 21 is targeted for 2023.3 and it's EAPs, please follow for the news, thank you


Please sign in to leave a comment.