This program displays the MAC address of the network interface.
This program accepts the System name in LAN as Input and displays the IP Address and Physics Address of the system.
This program accepts the System name in LAN as Input and displays the IP Address and Physics Address of the system.
span style="color: #006699;">java.net.InetAddressjava.net.NetworkInterfacejava.net.SocketExceptionjava.net.UnknownHostExceptionjava.util.Scanner"Enter System Name: ""address = ""MAC Address : ""%02X%s", mac[i], (i<mac.length - 1) ? "-" :"""Address doesn't exist or is not accessible/""Network Interface for the specified address is not found"Sample outputEnter System Name: myhomepc address = myhomepc/169.254.189.225 MAC Address : 08-00-27-00-C4-03