As you can see, I have passed all requirements but the first one.
My code shows that I have indeed call the program to read from the keyboard twice.
Is this a bug ?
package com.codegym.task.task04.task0422;
/*
18+
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
ArrayList<String> int_list = new ArrayList<String>(2);
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String key = reader.readLine();
while (key != null){
int_list.add(key);
key = reader.readLine();
}
if (Integer.parseInt(int_list.get(1)) < 18){
System.out.print("Grow up a little more");
}
}
}