Hello,
I have a variable of type Long contains a MAC address (a number between 0x000 and 0xFFF)
How to convert this number into a string of the form: xx: xx: xx: xx: xx: xx
Xx represents the hexadecimal value decomposition of the MAC address
eg
also, when I do this:If my variable is 0x010203040506
I want the string "01:02:03:04:05:06"
If the string is not a number that generates an error to me, how to avoid this?Code:Long temp = Long.parseLong(varSTR, 16);
Bookmarks