InetAddress IsLinkLocalAddress() Example

Utility routine to check if the InetAddress is an link local address.


InetAddressclass IsLinkLocalAddress() method example. This example shows you how to use IsLinkLocalAddress() method.This method gives Utility routine to check if the InetAddress is an link local address.

Here is the code:-
/* 
 * @Program that gives Utility routine to check if the InetAddress is a
    link local address
 * IsAnyLocalAddress.java 
 * Author:-RoseIndia Team
 * Date:-19-Jun-2008
 */

import java.net.*;
public class IsLinkLocalAddress {
public static void main(String[] argsthrows UnknownHostException{
InetAddress ia = InetAddress.getLocalHost();
System.out.println("Inetaddress is a link local address: "+ia.isLinkLocalAddress());
    }

}

Output of the program:-
 Inetaddress is a link local address: false

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US