1
は、私が試した:どのようにを変換する:(int)5(バイト)0x05 Java?
int amount = 5;
String amountStr = "0x0" + amount;
byte newByte = Byte.parsByte(amountStr);
しかし、私はjava.lang.NumberFormatException: For input string: "0x05"
を取得します。
'newByte =(byte)amount'? –