Address Resolution Protocol in Java

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.
  1. 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 output
Enter System Name: 
myhomepc
address = myhomepc/169.254.189.225
MAC Address : 08-00-27-00-C4-03