Here you can find the source of loadDoubleArray(Scanner reader)
public static double[] loadDoubleArray(Scanner reader)
//package com.java2s; //License from project: Open Source License import java.util.Scanner; public class Main { public static double[] loadDoubleArray(Scanner reader) { int dim = reader.nextInt(); double[] ret = new double[dim]; for (int i = 0; i < dim; i++) { ret[i] = Double.parseDouble(reader.next()); }// ww w . j a v a2 s . c o m return ret; } public static double[] loadDoubleArray(Scanner reader, int size) { double[] ret = new double[size]; for (int i = 0; i < size; i++) { ret[i] = Double.parseDouble(reader.next()); } return ret; } }