Timeline for Insist on an answer
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 4, 2017 at 14:52 | comment | added | Justin | I'm pretty sure you can remove the import if you inline the use of the scanner; pretty sure leaking a scanner works just fine: while(new java.util.Scanner(System.in).nextLine().isEmpty()); | |
| May 4, 2017 at 7:02 | history | edited | Leaky Nun | CC BY-SA 3.0 | added 51 characters in body |
| May 4, 2017 at 7:01 | comment | added | Kevin Cruijssen | You can golf it by two bytes: Change the while to a for and put the Scanner s=new Scanner(System.in); inside it. And change the .equals("") to .isEmpty(). | |
| May 4, 2017 at 5:50 | history | answered | Leaky Nun | CC BY-SA 3.0 |