我有这样的字符串
String text = "f001050000000000003d61c1c1df400200c0000009181600ef014000003f20"
我将其转换为字节以将其作为字节循环
byte[] bytes = new BigInteger(text,16).toByteArray();
for (int i = 1; i < bytes.length; i++)
{
System.out.print(String.format("%02x ", bytes[i]));
}
我想将 i 的字节值bytes[i]
与类似的等效字符串进行比较
for (int i = 1; i < bytes.length; i++)
{
if (bytes[i] == "f0")
{
break;
}
System.out.print(String.format("%02x ", bytes[i]));
}
这肯定行不通,但我该怎么做这个比较