Java API Tutorial - Java Locale.getDisplayScript()








Syntax

Locale.getDisplayScript() has the following syntax.

public String getDisplayScript()

Example

In the following code shows how to use Locale.getDisplayScript() method.

/*from  www  . j  av  a  2  s .c  om*/

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.getDisplayScript());

   }
}

The code above generates the following result.