Following Dean_Grobler's suggestion you may read each number as a string s, and then convert s into a decimal number in the type of double by the following line of code:
double d = Double.parseDouble(s);
or convert s into a decimal number in the type of float:
float f = Float.parseFloat(s);