class Main { public static void main(String[] args) { // create a string using new String name = new String("Java String"); System.out.println(name); // print Java String } }