Java API Tutorial - Java InetAddress.isMCGlobal()








Syntax

InetAddress.isMCGlobal() has the following syntax.

public boolean isMCGlobal()

Example

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

import java.net.InetAddress;
//ww w.j  a v  a2  s .  c om
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.isMCGlobal());
  }
}

The code above generates the following result.