Integer16 Summary The wrapper class for the short primitive type. Description The System.Integer16 class represents 16-bit signed integers. The System.Integer16 class is the wrapper class for the short primitive type. The range for 16-bit signed integers is [ -32768, 32767 ] (inclusive). Examples Instantiation 123import System; System.Integer16 x = new System.Integer16(100); Auto-boxing 123import System; System.Integer16 x = 100; Primitives Only 12short x = 1;short y = 2; Methods compareCompares the Integer16 object to another Integer16 object. fromStringConverts a string to a short value. fromStringOrConverts a string to its equivalent short value or the provided default value if the conversion fails. fromStringOrThrowConverts a string to a valid short value or throws an exception if the value cannot be converted. Integer16 (Constructor)Constructs a System.Integer16 object. isEvenChecks if the number is an even number. isOddChecks if the number is an odd number. MAX_VALUERepresents the maximum value for the short type. MIN_VALUERepresents the minimum value for the short type. toBaseReturns a string representation of the integer value using the specified base. toBinaryReturns the binary (base 2) value of the integer. toDecimalReturns the decimal (base 10) value of the integer. toExponentialFormats the integer value using exponential notation. toExternalConverts the short value to its equivalent external value. toFixedFormats the integer value using fixed-point notation. toHexReturns the hexadecimal (base 16) value of the integer. toPrecisionFormats the integer value as a string to the given precision. toStringConverts the short value to an equivalent string value. valueOfReturns the primitive short value wrapped by the System.Integer16 object. Share HTML | BBCode | Direct Link