Hi, I'm new to java, I'm doing a java project now, it has several clients machines and 5 server machines, each client will send same timestamp to server, server will reply their own timestamps to clients, these timestamps are all defined by myself, I've done this step, and now I want to find the maximum timestamps returned from the 5 servers. I defined an array ts to collect the timestamps returned from the servers and an inner class max to compute the maximum value, but when i run this program, after the 1st server returned a timestamp to the client, then the client side shows:java Client
Client is running
Timestamp returned from server :4
Exception in thread "main" java.io.EOFException at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:323)
then it is jumped out, I'm not sure what's wrong with it, could anyone help me? Many thanks! Here are my Client and Server code.