Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.text.NumberFormat;
import java.util.Locale;

public class Main {
    public static void main(String[] args) throws Exception {
        NumberFormat formatter = NumberFormat.getNumberInstance(Locale.ITALY);
        String number = formatter.format(123456789.12);
        System.out.println("Number in Italy: " + number);
        formatter = NumberFormat.getNumberInstance(Locale.JAPAN);
        number = formatter.format(123456789.12);
        System.out.println("Number in Japan: " + number);
    }
}