Here you can find the source of loadNDimDoubleMatrix(Scanner reader, int numberOfDim, Object nmatrix)
public static int[] loadNDimDoubleMatrix(Scanner reader, int numberOfDim, Object nmatrix)
//package com.java2s; //License from project: Open Source License import java.util.Scanner; public class Main { public static int[] loadNDimDoubleMatrix(Scanner reader, int numberOfDim, Object nmatrix) { int[] dim = new int[numberOfDim]; for (int i = 0; i < dim.length; i++) { dim[i] = Integer.parseInt(reader.next()); }//w w w . j a v a2 s.com return dim; } }