Java API Tutorial - Java InetAddress.isMCNodeLocal()








Syntax

InetAddress.isMCNodeLocal() has the following syntax.

public boolean isMCNodeLocal()

Example

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

import java.net.InetAddress;
//w ww  .  ja  v  a2 s . com
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.isMCNodeLocal());
  }
}

The code above generates the following result.