@@ -0,0 +1,1358 @@
+import java.io.*;%0Aimport java.net.*;%0Aimport java.util.*;%0Aimport static java.lang.System.out;%0A%0Apublic class ListNets %7B%0A%0A    public static void main(String args%5B%5D) throws SocketException %7B%0A        Enumeration%3CNetworkInterface%3E nets = NetworkInterface.getNetworkInterfaces();%0A        for (NetworkInterface netint : Collections.list(nets))%0A            displayInterfaceInformation(netint);%0A    %7D%0A%0A    static void displayInterfaceInformation(NetworkInterface netint) throws SocketException %7B%0A        out.printf(%22Display name: %25s%5Cn%22, netint.getDisplayName());%0A        out.printf(%22Name: %25s%5Cn%22, netint.getName());%0A        Enumeration%3CInetAddress%3E inetAddresses = netint.getInetAddresses();%0A        for (InetAddress inetAddress : Collections.list(inetAddresses)) %7B%0A            out.printf(%22InetAddress: %25s%25s%25s%5Cn%22, inetAddress.getHostAddress(),%0A                       inetAddress.isLoopbackAddress()?%22 (loopback)%22:%22%22,%0A                       inetAddress.isLinkLocalAddress()?%22 (linklocal)%22:%22%22);%0A        %7D%0A        List%3CInterfaceAddress%3E ifAddresses = netint.getInterfaceAddresses();%0A        for (InterfaceAddress ifAddress : ifAddresses) %7B%0A            out.printf(%22InterfaceAddress: %25s/%25d%5Cn%22, ifAddress.getAddress(),ifAddress.getNetworkPrefixLength());%0A            out.printf(%22Broadcast:        %25s%5Cn%22, ifAddress.getBroadcast());%0A        %7D%0A        out.printf(%22%5Cn%22);%0A     %7D%0A%7D

add ListNets