Can we convert a string to hexadecimal in java

295    Asked by Aashishchaursiya in Python , Asked on Apr 24, 2021

If yes how can we do this?

Answered by ananya Pawar

I find this to be an easy way to convert String to Hex Java:


public String hexToString(String hexa) {
    return Integer.toHexString(Integer.parseInt(hexa));
}

Your Answer

Interviews

Parent Categories