Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Locale;

public class Main {
    public static String GetPurePercentString(double percent) {
        if ("zh".equals(Locale.getDefault().getLanguage()))
            return " " + String.format("%.2f", percent) + "%";
        else
            return " " + String.format("%.2f", percent) + "%";
    }

    public static String GetLanguage() {
        return Locale.getDefault().getLanguage();
    }
}