Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (10.2k points)

I have an array of bytes. I want each byte String of that array to be converted to its corresponding hexadecimal values.

Is there any function in Java to convert a byte array to Hexadecimal ?

1 Answer

0 votes
by (46k points)

The Best solution is this badass one-liner:

String hex=DatatypeConverter.printHexBinary(byte[] b);

Related questions

0 votes
1 answer
0 votes
1 answer
asked Aug 19, 2019 in Java by Suresh (3.4k points)
0 votes
1 answer

Browse Categories

...