public final class Short extends Object
Modifier and Type | Field and Description |
---|---|
static short |
MAX_VALUE
The maximum value a Short can have.
|
static short |
MIN_VALUE
The minimum value a Short can have.
|
Constructor and Description |
---|
Short(short value)
Constructs a Short object initialized to the specified short value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this object to the specified object.
|
int |
hashCode()
Returns a hashcode for this Short.
|
static short |
parseShort(String s)
Assuming the specified String represents a short, returns that short's value.
|
static short |
parseShort(String s,
int radix)
Assuming the specified String represents a short, returns that short's value in the radix specified by the second argument.
|
short |
shortValue()
Returns the value of this Short as a short.
|
String |
toString()
Returns a String object representing this Short's value.
|
static Short |
valueOf(short i)
Returns the object instance of i
|
public static final short MAX_VALUE
public static final short MIN_VALUE
public Short(short value)
public boolean equals(Object obj)
public int hashCode()
public static short parseShort(String s) throws NumberFormatException
NumberFormatException
public static short parseShort(String s, int radix) throws NumberFormatException
NumberFormatException
public short shortValue()
public String toString()
public static Short valueOf(short i)
i
- the primitive