Java Scanner Read readArr(Scanner in, int n)

Here you can find the source of readArr(Scanner in, int n)

Description

read Arr

License

Open Source License

Declaration

public static int[] readArr(Scanner in, int n) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Scanner;

public class Main {
    public static int[] readArr(Scanner in, int n) {
        int[] ar = new int[n];
        for (int i = 0; n - i != 0; i++) {
            ar[i] = in.nextInt();/* w ww .ja  v  a 2 s.  c om*/
        }
        return ar;
    }
}

Related

  1. loadSolution(File file)
  2. loadTestProgram(final Class resourceClass, final String fileName)
  3. loadTimeseries(File file, String delimeter, int _amountOfLines)
  4. read()
  5. read(Class clazz, String f)
  6. readCQLFile(String cqlFileName)
  7. readFile(Class ownerClass, String fileName)
  8. readFile(File f)
  9. readFile(File f)