I found this post
here showing multiple solutions on this, and an answer is selected, but I just can't get it to work on my part.
Expected output:
input:
String hexString = "1234";
output: byte[] {0x12,0x34}
here is my code:
My output:
instead of "0x12" I get "18". Which could be the byte presentation of 12, as this answer was accepted I guessed that it should also work as the OP stated. Can anyone tell me what I'm doing wrong here?
I found an alternative solution: