I am trying to make an array so that whatever the byte input, the next three answer will multiply itself by 1024. At the moment the inputs are all the same. Grateful if anyone could help
public class ExcerciseFour {
static Scanner keyboard = new Scanner(System.in);
public static void main(String[] args) {
final String [] UNITS = {"B","KB","MB","GB"};
double bytes;
double kilobytes;
double megabytes;
double gigabytes;
System.out.print("Enter in bytes: ");
bytes = keyboard.nextDouble();
kilobytes = (bytes/1024);
megabytes = (bytes/1048576);
gigabytes = (bytes/1073741824);
// System.out.println(bytes+"bytes"+" is equivalent to "+kilobytes+(UNITS[1])+", "+megabytes+UNITS[2]+", "+gigabytes+UNITS[3]+".");
double [] conversion = new double [3];
for(int i=0;i<conversion.length;i++){
conversion[i]=bytes/1024;
}
System.out.println(Arrays.toString(conversion));
}
}