Reference > Methods toHex(num)¶ Definition¶ Integer toHex(Number num) Description¶ Converts number to base 16 representation as a String Parameter Definition¶ Name Type Description num Number Number to be converted to base 16 Examples¶ 1 2 3 4String r1 = toHex(16); // r1 == 10 String r2 = toHex(-100); // r2 == ffffff9c String r3 = toHex(3); // r3 == 3 String r4 = toHex(257); // r4 == 101