Learning Java: client-server