January 2002
Intermediate to advanced
264 pages
8h 3m
English
java.lang.Short
This class is a smaller counterpart to the J2SE
Short class. It provides an object wrapper around
a single short primitive data type. The class
provides minimum and maximum constant values that can be used to test
the legal size of a short. The value of the
object’s short is accessed using the
shortValue() method. In addition, the
parseShort() methods can convert a number from a
String to a short, and vice
versa, with an optionally specified radix.
public final classShort{ // public constants public static final shortMIN_VALUE; public static final shortMAX_VALUE; // static methods public static shortparseShort(String s) throws java.lang.NumberFormatException; public static shortparseShort(String s, int radix) throws java.lang.NumberFormatException; // constructor publicShort(short value); // public instance methods public booleanequals(Object obj); public inthashCode(); public shortshortValue(); public StringtoString(); }
Read now
Unlock full access