I am working on a program and I want to allow a user to enter multiple integers when prompted. I have tried to use a scanner but I found that it only stores the first intege
Using BufferedReader -
StringTokenizer st = new StringTokenizer(buf.readLine()); while(st.hasMoreTokens()) { arr[i++] = Integer.parseInt(st.nextToken()); }