I have a file that contains numbers separated by a space, i can read in the file using scanner, and it displays just as the file shows it. How can i print the numbers vertically one by one?
try(Scanner reader = new Scanner(file)){
            while(reader.hasNextLine()){
                String line = reader.nextLine();
                System.out.println(line);
            }
 
     
     
     
     
    