hildegarbage
Programmer
I have a simple Client-server program and I couldnt get the communication to work until I found that I had tried to create the inputstream before the outputstream. Why does this not work?
ObjectInputStream in = new ObjectInputStream(
serverSocket.getInputStream());
ObjectOutputStream out = new ObjectOutputStream(
serverSocket.getOutputStream());
(This order does not work.)
ObjectInputStream in = new ObjectInputStream(
serverSocket.getInputStream());
ObjectOutputStream out = new ObjectOutputStream(
serverSocket.getOutputStream());
(This order does not work.)