Scanner InputStream / .
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
if (sc.nextLine().equals("")) break;
System.out.println (" The array is + scan.nextInt() " + readChars + " !!!" );
count++;
}
( ) ( , ). empty.
BufferedReader , Scanner, Scanner . InputStream .
EDIT: BufferedReader, . , try-catch (), BufferedReader.
BufferedReader buff = new BufferedReader (new InputStreamReader(System.in));
try {
String read = buff.readLine();
while (read.equals("") == false && read.equals("\n") == false) {
int nextInt = Integer.parseInt(read);
System.out.println (" The array is + scan.nextInt() " + nextInt + " !!!" );
count++;
read = buff.readLine();
}
} catch (IOException e) {
e.printStackTrace();
}
, BufferedReader , .
. int, , int, , . , int, , .