In this example we will show the method to create a string in Java.
Source Code
package com.beginner.examples;
public class CreateString {
public static void main(String[] args) {
String s = "ok"; // String
System.out.println(s);
}
}
Output:
ok