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) {
        // create a new array and get all installed locales
        Locale[] locales = Locale.getAvailableLocales();

        System.out.println("Installed locales are:");
        for (int i = 0; i < locales.length; i++) {
            System.out.println(i + ":" + locales[i]);
        }
    }
}