netbeans ide 22 and jdk 22

 --enable-preview


project ->properties







code

/*

 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license

 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template

 */

package javaapplication3;


/**

 *

 * @author atkiw

 */

public class JavaApplication3 {


    /**

     * @param args the command line arguments

     */

    public static void main(String[] args) {

        // TODO code application logic here

        System.out.println("hello world");

         String name = "Alice";

        int age = 30;

        String message = STR."Hello, \{name}! You are \{age} years old.";

        

        System.out.println(message);

    }

    

}



----------------