Java Chat Multi-Client Receiving thread

In a lot of multclient java programs people use a separate thread which only receives the messages from the server. Is it really necessary? Why can’t it be done in the main thread? What should be the …