Hi, I deleted last request because I didn't knew how to edit it. AzjaLevel 30 , Krakow 36 minutes ago Your code is working fine and "end" variable is updated but it is recommended to use "StringBuilder class" for string concatenation and it should use "getFileContents method" in "run method" because now this code doesn't use created thread. Also you don't have to override "start method" because it's already overridden from inheriting "Thread class". P.S: There is useful method with working with String when you have additional spaces at the end of the line called "trim". It just remove additional spaces from the end and from the beginning. There is how it works https://www.tutorialspoint.com/java/java_string_trim.htm Reply gmb55Level 18 , Krakow 3 minutes ago Ok, but how about now? When I put it in run() to get Threads it dosen't work.
"C:\Program Files\Java\jre\bin\java.exe" -Dfile.encoding=windows-1250 -jar D:\Programowanie\Aplikacje\test_java\out\artifacts\test_java_jar\test_java.jar
null
null
Process finished with exit code 0
There is null, because this doesn't update end variable from while loop in run() method. And I don't know why :/