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 {
    static public void main(String args[]) throws Exception {
        Enumeration interfaces = NetworkInterface.getNetworkInterfaces();
        while (interfaces.hasMoreElements()) {
            NetworkInterface ni = (NetworkInterface) interfaces.nextElement();
            System.out.println(ni);
        }
    }
}