src/share/classes/java/lang/Short.java

Print this page

        

@@ -217,10 +217,13 @@
      * should generally be used in preference to the constructor
      * {@link #Short(short)}, as this method is likely to yield
      * significantly better space and time performance by caching
      * frequently requested values.
      *
+     * This method will always cache values in the range -128 to 127,
+     * inclusive, and may cache other values outside of this range.
+     *
      * @param  s a short value.
      * @return a {@code Short} instance representing {@code s}.
      * @since  1.5
      */
     public static Short valueOf(short s) {