Are string templates supported yet?
Answered
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
System.out.println(message);
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?
Please sign in to leave a comment.
Hello, support for java 21 is targeted for 2023.3 and it's EAPs, please follow https://blog.jetbrains.com/idea/ for the news, thank you