Create Unicode String in Java
Description
The following code shows how to create Unicode String.
Example
The Greek letter p, for example, is \u03C0.
// www . j a va2s . c o m
public class Main {
public static void main(String[] arg) {
String s = "\u03C0";
System.out.println(s);
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »