unreported exception (socket connection)
I am trying to create an applet connecting to a local unit, but am stuck..
the code giving me problems is:
forget the system.out part...
public void start()
Socket clientSocket = new Socket("192.168.2.38",876);
DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());
BufferedReader inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
sentence = inFromServer.readLine();
}catch (ConnectException e)
something is wrong and I think it's because something is missing.. but what?
the error report I am getting is:
unreported exception java.net.unknownhostexception; must be caught or declared to be thrown