Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

Help me out to solve the exception  RSS feed

 
sukhavasi vasavi
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Report post to moderator
Iam new to Socket Connection in java.
while Iam going to create the socket connection ,it is throwing an exception.
Could you please tell me the problem in this program?

import java.net.*;
import java.io.*;
public class Whois {

public static void main(String[] args)throws Exception {

Socket s=new Socket("www.yahoomail.com",80);
System.out.println(s.getInetAddress());
System.out.println(s.getPort());

}

}
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
What is the exception?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!