Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Locale;

public class Main {

    public static void main(String[] args) {
        Locale locale = new Locale("en", "US", "WIN");

        System.out.println("Locale:" + locale);

        // get ISO languages
        String[] languages = Locale.getISOLanguages();

        // print countries
        System.out.println("Languages are:");
        for (int i = 0; i < languages.length; i++) {
            System.out.println(i + ":" + languages[i]);
        }
    }
}