I have scanner(on client) that is getting information from(server), when server sends all required strings, all the code after that is just not being executed(like it paused execution of the program). Example(it loops and prints good, until server is sending all the data, but, when its finished, it does not execute print, or any other command, even in the loop itself!):
while(scanner1.hasNextLine()){
System.out.print("-- " + scanner1.nextLine());
}
System.out.print("Something bla bla");
RESULT: -- data 1 -- data 2
Btw, i am new in Java, so if I made any stupid mistakes, I apologize :)