I am really confused. It does print out to all the clients a string that i enter on the server. Now how do i make it so the client can send Strings to the server and then the Server print them on all clients? I think that is the next step. That way in my game I can have the person enter their move via keyboard input and then pass it to the server which would then print it out on all clients so both clients could see all the moves. Then when there is a winner I could send that to all clients and have it displayed as well. So basically I need a method that takes a string and sends it to the server and then the server passes it to all clients which would be max 2 clients because 2 people play at once. Here is the Server class's receive method that I have been working on but does not work. I thought if this could return what is received as a String then that String could be passed into the send method and sent to all the clients. I just hangs when receive is hit.
private static String receive() throws IOException
{
String test = "";
try
{
test = (String)input.readObject();
System.out.print("\n" + test);
} // end try
catch(ClassNotFoundException classNotFoundException)
{
System.out.print("\nUnknown object recieved");
} // end catch
return test;
} // end receive