Q:

Network Chat Programming

learning to network program from TheCherno's Network chat programming series and I got to 24 without any issues and everything is the same, then when I launched the server and connected to it with a localhost IP, it gave me an exception in thread "receive". Here is the exact error.
Exception in thread "receive" java.lang.NullPointerException
at com.josh.chat.server.Server.process(Server.java:93)
at com.josh.chat.server.Server.access$2(Server.java:87)
at com.josh.chat.server.Server$2.run(Server.java:59)

I know it connects because it tells me the Identifier and that only works if the client connects to the server, but the server isn't giving any feedback. What is the problem? Here is my code. 

A:

You never assign a value to clients:
List<ServerClient> clients;

Try:
List<ServerClient> clients = new ArrayList<>();

(And learn how to debug your code).

