I have two Java projects that communicate with sockets through strings. One is a client and the other is a server. The server accepts the connection trough the \"ServerSocke
In your send methods, try changing out.write(m) to out.println(m).
Each time you are using the readLine method it will keep reading until it hits a new line character or line separator. The println method will automatically put a line.separator at the end of the string you are trying to send.
https://docs.oracle.com/javase/7/docs/api/java/io/PrintWriter.html#println()
Your server sends "USERNAME" and then waits. The client reads the next line, and blocks until it receives it. So you have a deadlock, since the server never sends an EOL character. If the client reads a line, the server should send a line.