[Solved] I have an issue using tokens, scanning multiple inputs and executing them at the same time


If I understand correctly your Scanner is breaking on spaces. You want it to break on new lines:

Scanner scanner = new Scanner(System.in);
scanner.useDelimiter(System.getProperty("line.separator")); // this scans for lines
while (scanner.hasNext()) {
    String input = scanner.next();
    System.out.println(input); // take a look for yourself
}

4

solved I have an issue using tokens, scanning multiple inputs and executing them at the same time