Connection Refused?
<p>I am getting the following exception in my code:
<img src="http://i.stack.imgur.com/KX9qE.jpg" alt="enter image description here"> </p>

<p>I cant understand the reason for this exception...</p>

<p>here is my code:
  {</p>

<pre><code>import java.net.*;
 import java.io.*;
 class whois {
  public static void main(String args[])throws Exception {
   int c;
   Socket s=new Socket("internic.net",43);
   InputStream in=s.getInputStream();
   OutputStream out=s.getOutputStream();
   String str=(args.length==0 ? "webopedia.com" : args[0])+"\n";
   byte buf[]=str.getBytes();
   out.write(buf);
   while((c=in.read())!=-1) {
    System.out.print((char)c);
   }
    s.close();
   }
  }
 }
</code></pre>

<p>please tell the reason for this exception.</p>
