I recommend just making a list of doubles. I don’t know if what you want to do is possible in Java.
Like so:
List<Double> dubs = new ArrayList<>();
while (in.hasNextLine)
{
dubs.add((double) in.next());
}
1
solved Is there a way to generate ints using i?