InetAddress IsAnyLocalAddress() Example

Utility routine to check if the InetAddress in a wildcard address.


InetAddressclass IsAnyLocalAddress() method example. This example shows you how to use IsAnyLocalAddress() method.This method gives Utility routine to check if the InetAddress in a wildcard address.

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

import java.net.*;
public class IsAnyLocalAddress {
public static void main(String[] args)throws UnknownHostException {
InetAddress ia = InetAddress.getLocalHost();
System.out.println("Inetaddress is a wildcard address: "+ia.isAnyLocalAddress());
    }
}

Output of the program:-
 Inetaddress is a wildcard address: false

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

HOME | COPYRIGHT | CONTACT US