Here's what I recieve: enter image description here

Here is my complete code:

class whois {
  public static void main(String args[])throws Exception {
     int c;
     Socket s=new Socket("",43);
     InputStream in=s.getInputStream();
     OutputStream out=s.getOutputStream();
     String str=(args.length==0 ? "" : args[0])+"\n";
     byte buf[]=str.getBytes();
     while((!=-1) {

If Time passes to this and kind there, they'll produce details about this domain. But I get another output. What's the reason behind this? Please explain.

Improve your "" to "". is really a registered domain which you'll look for in whois. is really a host, not really a domain.

You're typing in to the whois page, however in your code you're using Improve your code to make use of rather than