I'm using one line of input with buffered reader and I want to store the 3 numbers in 3 different variables. How would I do this
public static void main(String[] args) throws IOException {
InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
BufferedReader in = new BufferedReader(reader);
String line;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
}
}
For example if the input is "3 5 10" with spaces, how would i store this information in 3 different int variables