How do I loop in java until the user presses the enter button and then stops?
Sort of
while(System.in != ""){ do x; }
Try the following:
while (System.in.available() == 0) { // Do whatever you want }
Source: https://habr.com/ru/post/1442553/More articles:Zend Framework 2 TableGateway returns empty result set - phphow to learn with python on ubuntu if mysql is working? - pythonLRU cache in C ++ - c ++Reading a 200 megabyte json file takes 1.5 GB of memory - c ++Data Processing CSV - excelVirtualenv and libpython - python-3.xHow to use shared_ptr for COM interface pointers - c ++Output signal UTF-16 perl - windowsHow to convert '+' to +, '*' to * etc. - c ++Clear cin in C ++ - c ++All Articles