Hi,
I have a client-server app and the following code in the client:
I receive a NullPointerException error and I can't understand why. If the server is not sending anything,
shouldn't the app just wait at readObject, until it receives an Object? And if it's Null, shouldn't the
break statement handle that?
Thanks in advance
I have a client-server app and the following code in the client:
while(true) { try { TableDetails newDetails = (TableDetails) inObject.readObject(); //waits for object from server if (newDetails == null) break; //updateGamesList(newDetails); }catch(Exception ex){ex.printStackTrace();} }
I receive a NullPointerException error and I can't understand why. If the server is not sending anything,
shouldn't the app just wait at readObject, until it receives an Object? And if it's Null, shouldn't the
break statement handle that?
Thanks in advance