Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;

public class Main {
    public static String formatNumber(int number) {
        DecimalFormat formatter = new DecimalFormat();
        DecimalFormatSymbols symbol = new DecimalFormatSymbols();
        symbol.setGroupingSeparator('.');
        formatter.setDecimalFormatSymbols(symbol);
        return formatter.format(number);
    }
}