In the following program, client has to enter numbers and send them to server. Server has to compute the numbers which client is sent and send that result to client.
For the following code, I'm getting exception inside my server class:
java.io.StreamCorruptedException: invalid stream header: 75720002
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
And inside my Client class, exception:
Exception in thread "main" java.util.NoSuchElementException: No line found
at java.util.Scanner.nextLine(Scanner.java:1585)
How can I solve this problem ?