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 formatFileSize(long size) {
        long kb = 1024;
        long mb = kb * 1024;
        float f = (float) size / mb;
        //Defect 2114236 modify by shaohuali@tcl.com begin
        return String.format(Locale.ENGLISH, "%.2f MB", f); // MODIFIED by junping.zhang, 2016-05-25,BUG-2167946
        //Defect 2114236 modify by shaohuali@tcl.com end
    }
}