You are viewing a single comment's thread. Return to all comments →
I prefer a do-while loop for my code. Like this:
int count = 0; Scanner scan = new Scanner(System.in); do { count++; System.out.println(count + " " + scan.nextLine()); } while (scan.hasNextLine()); scan.close();
Seems like cookies are disabled on this browser, please enable them to open this website
Java End-of-file
You are viewing a single comment's thread. Return to all comments →
I prefer a do-while loop for my code. Like this: