why can't I round this double to the nearest int using Math.round, I get this error "cannot convert from long to int"
Double bat_avg = Double.parseDouble(data[4])/Double.parseDouble(data[2]);
int ibat_avg = Math.round(bat_avg*1000.00);
System.out.println(bat_avg);