public final class Short extends Number implements Comparable<Short>
Short
class wraps a value of primitive type short
in an object. An object of type Short
contains a
single field whose type is short
.
In addition, this class provides several methods for converting
a short
to a String
and a String
to a
short
, as well as other constants and methods useful when
dealing with a short
.
Number
,
Serialized FormModifier and Type | Field and Description |
---|---|
static short |
MAX_VALUE
A constant holding the maximum value a
short can
have, 215-1. |
static short |
MIN_VALUE
A constant holding the minimum value a
short can
have, -215. |
static int |
SIZE
The number of bits used to represent a
short value in two's
complement binary form. |
static Class<Short> |
TYPE
The
Class instance representing the primitive type
short . |
Constructor and Description |
---|
Short(short value)
Constructs a newly allocated
Short object that
represents the specified short value. |
Short(String s)
Constructs a newly allocated
Short object that
represents the short value indicated by the
String parameter. |