Java Locale.getScript()
Syntax
Locale.getScript() has the following syntax.
public String getScript()
Example
In the following code shows how to use Locale.getScript() method.
//ww w . j a v a2 s .c o m
import java.util.Locale;
public class Main {
public static void main(String[] args) {
Locale locale = Locale.CANADA_FRENCH;
System.out.println("Locale1:" + locale);
System.out.println(locale.getScript());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »