Module java.base
Package java.lang

Class Short

java.lang.Object
java.lang.Number
java.lang.Short
All Implemented Interfaces:
Serializable, Comparable<Short>, Constable

public final class Short extends Number implements Comparable<Short>, Constable
The 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.

This is a value-based class; programmers should treat instances that are equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail.

Since:
1.1
See Also: