public final class Byte extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
MAX_VALUE
The maximum value a Byte can have.
|
static byte |
MIN_VALUE
The minimum value a Byte can have.
|
Constructor and Description |
---|
Byte(byte value)
Constructs a Byte object initialized to the specified byte value.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Returns the value of this Byte as a byte.
|
boolean |
equals(Object obj)
Compares this object to the specified object.
|
int |
hashCode()
Returns a hashcode for this Byte.
|
static byte |
parseByte(String s)
Assuming the specified String represents a byte, returns
that byte's value.
|
static byte |
parseByte(String s,
int radix)
Assuming the specified String represents a byte, returns
that byte's value.
|
String |
toString()
Returns a String object representing this Byte's value.
|
public static final byte MIN_VALUE
public static final byte MAX_VALUE
public Byte(byte value)
value
- the initial value of the Bytepublic static byte parseByte(String s) throws NumberFormatException
s
- the String containing the byteNumberFormatException
- If the string does not
contain a parsable byte.public static byte parseByte(String s, int radix) throws NumberFormatException
s
- the String containing the byteradix
- the radix to be usedNumberFormatException
- If the String does not
contain a parsable byte.public byte byteValue()
public String toString()
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public boolean equals(Object obj)
equals
in class Object
obj
- the object to compare withBoolean.hashCode()
,
Hashtable
Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.