Formatting a byte array to string in java
- by rgksugan
I am using this code to find the MAC address of a machine.This code prints directly the MAC address, but i want to return it as a string.I am completely confused.
please help.
try {
InetAddress add = InetAddress.getByName("10.123.96.102");
NetworkInterface ni1 = NetworkInterface.getByInetAddress(add);
if (ni1 != null) {
…