Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.net.NetworkInterface;
import java.util.Enumeration;

public class Main {
    public static void main(String[] args) throws Exception {
        Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
        while (e.hasMoreElements()) {
            NetworkInterface nif = e.nextElement();
            System.out.println("Name: " + nif.getName() + ",  Supports Multicast: " + nif.supportsMulticast()
                    + ", isUp(): " + nif.isUp());
        }
    }
}