Java InetAddress.isMCLinkLocal()

Syntax

InetAddress.isMCLinkLocal() has the following syntax.

public boolean isMCLinkLocal()

Example

In the following code shows how to use InetAddress.isMCLinkLocal() method.


import java.net.InetAddress;
/*w  w w. j  a  va 2 s  .co  m*/
public class Main {
  public static void main(String[] argv) throws Exception {
    InetAddress address = InetAddress.getByName("web.mit.edu");
    System.out.println("Name: " + address.getHostName());
    System.out.println("Addr: " + address.getHostAddress());
    System.out.println(address.isMCLinkLocal());
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.net »




CookieManager
CookiePolicy
CookieStore
DatagramPacket
DatagramSocket
HttpCookie
HttpURLConnection
InetAddress
JarURLConnection
MulticastSocket
ServerSocket
Socket
SocketAddress
URI
URL
URLConnection
URLDecoder
URLEncoder