Convert byte value to mega byte value
public class Main {
public static void main(String args[]) {
long l = 9999999990L;
long MEGABYTE = 1024L * 1024L;
long b = l / MEGABYTE;
System.out.println(b + " Mb");
}
}
Home
Java Book
Runnable examples
Java Book
Runnable examples
Data Type Long:
- Create Long from long value
- Convert Long to numeric primitive data types
- Convert Long to String
- Convert byte value to mega byte value
- Min and Max values of datatype long