Name

java.lang.Short

Synopsis

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 short MIN_VALUE;
   public static final short MAX_VALUE;

   // static methods
   public static short parseShort(String s) throws
      java.lang.NumberFormatException;
   public static short parseShort(String s, int radix) throws
      java.lang.NumberFormatException;

   // constructor
   public Short(short value);

   // public instance methods
   public boolean equals(Object obj);
   public int hashCode();
   public short shortValue();
   public String toString();
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.