Tag Archives: MAX_VALUE

java.lang.Short Class & Methods


The java.lang.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. This class provides several utility 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.

Short class implements Comparable Interface that’s help while sorting list of Objects on natural order.

See Also:

Constants

  • static short MAX_VALUE :A constant holding the maximum value a short can have, 215-1.
  • static short MIN_VALUE :A constant holding the minimum value a short can have, -215.
  • static int SIZE :The number of bits used to represent a short value in two’s complement binary form.
  • static Class TYPE :The Class instance representing the primitive type short.

Constructors

  • Short(short value) :Constructs a newly allocated Short object that represents the specified short value.
  • Short(String s) :Constructs a newly allocated Short object that represents the short value indicated by the String parameter.

Methods

  • byte byteValue() :Returns the value of this Short as a byte.
  • static int compare(short x, short y) :Compares two short values numerically.
  • int compareTo(Short anotherShort) :Compares two Short objects numerically.
  • static Short decode(String nm) :Decodes a String into a Short.
  • double doubleValue() :Returns the value of this Short as a double.
  • boolean equals(Object obj) :Compares this object to the specified object.
  • float floatValue() :Returns the value of this Short as a float.
  • int hashCode() :Returns a hash code for this Short; equal to the result of invoking intValue().
  • int intValue() :Returns the value of this Short as an int.
  • long longValue() :Returns the value of this Short as a long.
  • static short parseShort(String s) :Parses the string argument as a signed decimal short.
  • static short parseShort(String s, int radix) :Parses the string argument as a signed short in the radix specified by the second argument.
  • static short reverseBytes(short i) :Returns the value obtained by reversing the order of the bytes in the two’s complement representation of the specified short value.
  • short shortValue() :Returns the value of this Short as a short.
  • String toString() :Returns a String object representing this Short’s value.
  • String toString(short s) :Returns a new String object representing the specified short.
  • static Short valueOf(short s) :Returns a Short instance representing the specified short value.
  • static Short valueOf(String s) :Returns a Short object holding the value given by the specified String.
  • static Short valueOf(String s, int radix) :Returns a Short object holding the value extracted from the specified String when parsed with the radix given by the second argument.

Exceptions

References

java.lang.Long Class & Methods


The java.lang.Long class wraps a value of the primitive type long in an object. An object of type Long contains a single field whose type is long.
This class provides several utility methods for converting a long to a String and a String to a long, as well as other constants and methods useful when dealing with a long.

Long class implements Comparable Interface that’s help while sorting list of Objects on natural order.

See Also:

Constants

  • static long MAX_VALUE :A constant holding the maximum value a long can have, 263-1.
  • static long MIN_VALUE :A constant holding the minimum value a long can have, -263.
  • static int SIZE :The number of bits used to represent a long value in two’s complement binary form.
  • static Class TYPE :The Class instance representing the primitive type long.

Constructors

  • Long(long value) :Constructs a newly allocated Long object that represents the specified long argument.
  • Long(String s) :Constructs a newly allocated Long object that represents the long value indicated by the String parameter.

Methods

  • static int bitCount(long i) :Returns the number of one-bits in the two’s complement binary representation of the specified long value.
  • byte byteValue() :Returns the value of this Long as a byte.
  • static int compare(long x, long y) :Compares two long values numerically.
  • int compareTo(Long anotherLong) :Compares two Long objects numerically.
  • static Long decode(String nm) :Decodes a String into a Long.
  • double doubleValue() :Returns the value of this Long as a double.
  • boolean equals(Object obj) :Compares this object to the specified object.
  • float floatValue() :Returns the value of this Long as a float.
  • static Long getLong(String nm) :Determines the long value of the system property with the specified name.
  • static Long getLong(String nm, long val) :Determines the long value of the system property with the specified name.
  • static Long getLong(String nm, Long val) :Returns the long value of the system property with the specified name.
  • int hashCode() :Returns a hash code for this Long.
  • static long highestOneBit(long i) :Returns a long value with at most a single one-bit, in the position of the highest-order (“leftmost”) one-bit in the specified long value.
  • int intValue() :Returns the value of this Long as an int.
  • long longValue() :Returns the value of this Long as a long value.
  • static long lowestOneBit(long i) :Returns a long value with at most a single one-bit, in the position of the lowest-order (“rightmost”) one-bit in the specified long value.
  • static int numberOfLeadingZeros(long i) :Returns the number of zero bits preceding the highest-order (“leftmost”) one-bit in the two’s complement binary representation of the specified long value.
  • static int numberOfTrailingZeros(long i) :Returns the number of zero bits following the lowest-order (“rightmost”) one-bit in the two’s complement binary representation of the specified long value.
  • static long parseLong(String s) :Parses the string argument as a signed decimal long.
  • static long parseLong(String s, int radix) :Parses the string argument as a signed long in the radix specified by the second argument.
  • static long reverse(long i) :Returns the value obtained by reversing the order of the bits in the two’s complement binary representation of the specified long value.
  • static long reverseBytes(long i) :Returns the value obtained by reversing the order of the bytes in the two’s complement representation of the specified long value.
  • static long rotateLeft(long i, int distance) :Returns the value obtained by rotating the two’s complement binary representation of the specified long value left by the specified number of bits.
  • static long rotateRight(long i, int distance) :Returns the value obtained by rotating the two’s complement binary representation of the specified long value right by the specified number of bits.
  • short shortValue() :Returns the value of this Long as a short.
  • static int signum(long i) :Returns the signum function of the specified long value.
  • static String toBinaryString(long i) :Returns a string representation of the long argument as an unsigned integer in base 2.
  • static String toHexString(long i) :Returns a string representation of the long argument as an unsigned integer in base 16.
  • static String toOctalString(long i) :Returns a string representation of the long argument as an unsigned integer in base 8.
  • String toString() :Returns a String object representing this Long’s value.
  • static String toString(long i) :Returns a String object representing the specified long.
  • static String toString(long i, int radix) :Returns a string representation of the first argument in the radix specified by the second argument.
  • static Long valueOf(long l) :Returns a Long instance representing the specified long value.
  • static Long valueOf(String s) :Returns a Long object holding the value of the specified String.
  • static Long valueOf(String s, int radix) :Returns a Long object holding the value extracted from the specified String when parsed with the radix given by the second argument.

Exceptions

References

 

java.lang.Integer Class & Methods


The java.lang.Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int. This class provides several methods for converting an int to a String and a String to an int, as well as other constants and methods useful when dealing with an int.

Integer class implements Comparable Interface that’s help while sorting list of Objects on natural order.

See Also:

Constants

  • static int MAX_VALUE :A constant holding the maximum value an int can have, 231-1.
  • static int MIN_VALUE :A constant holding the minimum value an int can have, -231.
  • static int SIZE :The number of bits used to represent an int value in two’s complement binary form.
  • static Class TYPE :The Class instance representing the primitive type int.

Constructors

  • Integer(int value) :Constructs a newly allocated Integer object that represents the specified int value.
  • Integer(String s) :Constructs a newly allocated Integer object that represents the int value indicated by the String parameter.

Methods

  • static int bitCount(int i) :Returns the number of one-bits in the two’s complement binary representation of the specified int value.
  • byte byteValue() :Returns the value of this Integer as a byte.
  • static int compare(int x, int y) :Compares two int values numerically
  • int compareTo(Integer anotherInteger) :Compares two Integer objects numerically.
  • static Integer decode(String nm) :Decodes a String into an Integer.
  • double doubleValue() :Returns the value of this Integer as a double.
  • boolean equals(Object obj) :Compares this object to the specified object.
  • float floatValue() :Returns the value of this Integer as a float.
  • static Integer getInteger(String nm) :Determines the integer value of the system property with the specified name.
  • static Integer getInteger(String nm, int val) :Determines the integer value of the system property with the specified name.
  • static Integer getInteger(String nm, Integer val) :Returns the integer value of the system property with the specified name.
  • int hashCode() :Returns a hash code for this Integer.
  • static int highestOneBit(int i) :Returns an int value with at most a single one-bit, in the position of the highest-order (“leftmost”) one-bit in the specified int value.
  • int intValue() :Returns the value of this Integer as an int.
  • long longValue() :Returns the value of this Integer as a long.
  • static int lowestOneBit(int i) :Returns an int value with at most a single one-bit, in the position of the lowest-order (“rightmost”) one-bit in the specified int value.
  • static int numberOfLeadingZeros(int i) :Returns the number of zero bits preceding the highest-order (“leftmost”) one-bit in the two’s complement binary representation of the specified int value.
  • static int numberOfTrailingZeros(int i) :Returns the number of zero bits following the lowest-order (“rightmost”) one-bit in the two’s complement binary representation of the specified int value.
  • static int parseInt(String s) :Parses the string argument as a signed decimal integer.
  • static int parseInt(String s, int radix) :Parses the string argument as a signed integer in the radix specified by the second argument.
  • static int reverse(int i) :Returns the value obtained by reversing the order of the bits in the two’s complement binary representation of the specified int value.
  • static int reverseBytes(int i) :Returns the value obtained by reversing the order of the bytes in the two’s complement representation of the specified int value.
  • static int rotateLeft(int i, int distance) :Returns the value obtained by rotating the two’s complement binary representation of the specified int value left by the specified number of bits.
  • static int rotateRight(int i, int distance) :Returns the value obtained by rotating the two’s complement binary representation of the specified int value right by the specified number of bits.
  • short shortValue() :Returns the value of this Integer as a short.
  • static int signum(int i) :Returns the signum function of the specified int value.
  • static String toBinaryString(int i) :Returns a string representation of the integer argument as an unsigned integer in base 2.
  • static String toHexString(int i) :Returns a string representation of the integer argument as an unsigned integer in base 16
  • static String toOctalString(int i) :Returns a string representation of the integer argument as an unsigned integer in base 8.
  • String toString() :Returns a String object representing this Integer’s value.
  • static String toString(int i) :Returns a String object representing the specified integer.
  • static String toString(int i, int radix) :Returns a string representation of the first argument in the radix specified by the second argument
  • static Integer valueOf(int i) :Returns an Integer instance representing the specified int value.
  • static Integer valueOf(String s) :Returns an Integer object holding the value of the specified String
  • static Integer valueOf(String s, int radix) :Returns an Integer object holding the value extracted from the specified String when parsed with the radix given by the second argument.

Exceptions

References