Cant figure out. On the second while-run, it will not even wait for user input and crashes instead with
Exception in thread "main" java.util.NoSuchElementException: No line found
Ofc if theres no input, there hardly is a line I assume. So what may I do here?
while (go) {
Scanner jain = new Scanner(System.in);
String jainstr = jain.nextLine();
jain.close();
}
Intellij 2018.2