Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.text.DecimalFormat;
import java.text.NumberFormat;

public class Main {

    public static String byteToKB(int bt) {
        DecimalFormat df = (DecimalFormat) NumberFormat.getInstance();
        df.setMaximumFractionDigits(2);
        return df.format(bt / 1024.0) + " KB";
    }
}