i have following code:
Scanner input = new Scanner(System.in);
input.useDelimiter("\n")
System.out.println(input.next());
System.out.println("end");
when i run it and type "orange apple" then enter, it will print
orange apple
end
instead of
orange apple
end
which is what i actually wanted to print. i have no idea why it keeps printing an extra empty line. How can i fix this?