How to check your internet connection using Java Netbeans program with Source Code
How to check your internet connection using Java Netbeans program with Source Code
*** source code ***
Socket si=new Socket();
InetSocketAddress isa= new InetSocketAddress("www.google.com",80);
try
{
si.connect(isa,0);
JOptionPane.showMessageDialog(null,"successfully connected");
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,"please connect your internet connection");
}
Comments
Post a Comment