【发布时间】:2011-03-19 17:23:05
【问题描述】:
我需要以无符号格式打印byte 类型的变量。我该怎么做?
【问题讨论】:
-
public static int unsignedToBytes(byte b) { return b & 0xFF; }
-
您的问题不清楚。请举例说明您想要什么。
-
@Neigyl:把它放在答案中。这样你会得到更多的代表。:)
标签: java int unsigned-integer