Java tutorial
//package com.java2s; public class Main { public static String formatByteToMB(int size) { float mb = size / 1024f / 1024f; return String.format("%.2f", mb); } }