Suppose I want to read from the BufferedReader in which the System.in console is fed
Charset charset = Charset.forName("UTF-8"); Reader reader = new InputStreamReader(System.in, charset); BufferedReader bufferedReader = new BufferedReader(reader); 1) how to correctly mark the end of reading from the console, so that the code goes further (for example, I enter "close", or press enter)
2) from reading you need to get a list of words that consist only of words and numbers
input:
ΠΠ°ΠΌΠ° ΠΌΡΠ»Π°-ΠΌΡΠ»Π°-ΠΌΡΠ»Π° ΡΠ°ΠΌΡ! output
[ΠΌΠ°ΠΌΠ° ΠΌΡΠ»Π° ΠΌΡΠ»Π° ΠΌΡΠ»Π° ΡΠ°ΠΌΡ]