Hi all,
Has anyone else noticed some discrepancies in Sun's documenation of exceptions?
For example, I'm using the Socket constructor which takes two arguments: (1) a
String which is the host and (2) and int which is the port number.
The declaration of this method in the documentation is
public Socket(String host, int port) throws UnknownHostException, IOException
However, if you read down a few lines, under the
Throws header it says the method throws IOException and SecurityException.
Must I catch all three? If so, why aren't all three included in the
throws part of the declaration? I am a little confused.
Thanks in advance.
Stephanie