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中的方法






















