Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inet Demo Java source code
#1

import java.net.*;
import java.io.*;

class InetDemo2
{
byte buff[];
InetAddress idr;
String addrmsg;
InetDemo2() throws UnknownHostException
{
buff=new byte[4];
idr=InetAddress.getLocalHost();
buff=idr.getAddress();
addrmsg=idr.getHostName()+"/";
}
public String toString()
{
for(int i=0;i<buff.length;i++)
addrmsg+=(buff[i] & 255) + ".";
return "The Local Host Address is"+addrmsg;
}
public static void main(String args[])throws UnknownHostException
{
InetDemo2 d =new InetDemo2();
System.out.println(d);
}


}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: http inet pvc pipes, inet led mtnl, inet light is not on in mtnl broadband dna a212, dna a213 modem inet light is not coming, inet is not working in mtnl dna a212 router, dna 213 mode inet light is not blinking, dna a212 router inet led,

Forum Jump:


Users browsing this thread: 1 Guest(s)