Byte 基本数据类型byte 的包装类
Byte 类型的对象包含一个 byte类型的字段
属性简介
构造方法
Byte的构造方法也是有两种
常用方法
比较
| static int compare(byte x, byte y) |
静态方法 x<y 小于0 x=y 等于0 x>y 大于0
|
| int compareTo(Byte anotherByte) |
实例方法 调用静态方法处理两个对象内部value的值
|
decode
| 类似 Integer和Long Byte也有提供XXXValue系列方法,原理也跟他们类似 全部都是强转 |
|
byteValue()
shortValue()
intValue()
longValue()
floatValue()
doubleValue()
|
toString toXXXString 系列
| static String toString(byte b) |
静态方法
|
| String toString() |
实例方法
|
| static int toUnsignedInt(byte x) |
静态方法
|
| static long toUnsignedLong(byte x) |
静态方法
|
hashcode
可以看得出来,Byte中的方法相对于Integer和Long少了很多
而且有些还是借助于Integer中的方法





















