Convert a hexadecimal String object to Byte.
The valueOf method of Byte class is used for converting a hexadecimal String to Byte object.
public class ByteWrapper {
public static void main(String[] args) {
String str = "f";
Byte objByte = Byte.parseByte(str, 16);
System.out.println(objByte);
}
}
Tags: Byte, Byte examples, Byte wrapper class, java.lang, java.lang.Byte
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply