Exception in thread “main” java.util.NoSuchElementException: No line found 3 [duplicate]
问题 This question already has an answer here : How to use java.util.Scanner to correctly read user input from System.in and act on it? (1 answer) Closed last year . In this code, throws me this exception: Exception in thread "main" java.util.NoSuchElementException: No line found at java.util.Scanner.nextLine(Scanner.java:1540) at com.cristianvalero.filetransfers.main.client.Client.askToDo(Client.java:98) at com.cristianvalero.filetransfers.main.client.Client.run(Client.java:64) at com