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: inet light is not on in mtnl broadband dna a212, inet led mtnl, in a 213 inet is not blinking, creating a project in omnet inet aodv rrep, dna a213 modem inet light is not coming, dna 213 mode inet light is not blinking, dna a213 modem inet light is not comming,

Forum Jump:


Users browsing this thread: 1 Guest(s)