Tag Archives: EXPONENT

java.lang.Float Class and Methods


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

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

See Also:

Constants

  • static int MAX_EXPONENT :Maximum exponent a finite float variable may have.
  • static float MAX_VALUE :A constant holding the largest positive finite value of type float, (2-2-23)·2127.
  • static int MIN_EXPONENT :Minimum exponent a normalized float variable may have.
  • static float MIN_NORMAL :A constant holding the smallest positive normal value of type float, 2-126.
  • static float MIN_VALUE :A constant holding the smallest positive nonzero value of type float, 2-149.
  • static float NaN :A constant holding a Not-a-Number (NaN) value of type float.
  • static float NEGATIVE_INFINITY :A constant holding the negative infinity of type float.
  • static float POSITIVE_INFINITY : constant holding the positive infinity of type float
  • static int SIZE :The number of bits used to represent a float value.
  • static Class TYPE :The Class instance representing the primitive type float.

Constructors

  • Float(double value) :Constructs a newly allocated Float object that represents the argument converted to type float.
  • Float(float value) :Constructs a newly allocated Float object that represents the primitive float argument.
  • Float(String s) :Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string.

Methods

  • byte byteValue() :Returns the value of this Float as a byte (by casting to a byte).
  • static int compare(float f1, float f2) :Compares the two specified float values.
  • int compareTo(Float anotherFloat) Compares two Float objects numerically.
  • double doubleValue() :Returns the double value of this Float object.
  • boolean equals(Object obj) :Compares this object against the specified object.
  • static int floatToIntBits(float value) :Returns a representation of the specified floating-point value according to the IEEE 754 floating-point “single format” bit layout.
  • static int floatToRawIntBits(float value) :Returns a representation of the specified floating-point value according to the IEEE 754 floating-point “single format” bit layout, preserving Not-a-Number (NaN) values.
  • float floatValue() :Returns the float value of this Float object.
  • int hashCode() :Returns a hash code for this Float object.
  • static float intBitsToFloat(int bits) :Returns the float value corresponding to a given bit representation.
  • int intValue() :Returns the value of this Float as an int (by casting to type int).
  • boolean isInfinite() :Returns true if this Float value is infinitely large in magnitude, false otherwise.
  • static boolean isInfinite(float v) :Returns true if the specified number is infinitely large in magnitude, false otherwise.
  • boolean isNaN() :Returns true if this Float value is a Not-a-Number (NaN), false otherwise.
  • static boolean isNaN(float v) :Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.
  • long longValue() :Returns value of this Float as a long (by casting to type long).
  • static float parseFloat(String s) :Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Float.
  • short shortValue() :Returns the value of this Float as a short (by casting to a short).
  • static String toHexString(float f) :Returns a hexadecimal string representation of the float argument.
  • String toString() :Returns a string representation of this Float object.
  • static String toString(float f) :Returns a string representation of the float argument.
  • static Float valueOf(float f) :Returns a Float instance representing the specified float value.
  • static Float valueOf(String s) :Returns a Float object holding the float value represented by the argument string s.

Exceptions

References

Advertisements
Advertisements

Your Feedback Motivate Us

If our FacingIssuesOnIT Experts solutions guide you to resolve your issues and improve your knowledge. Please share your comments, like and subscribe to get notifications for our posts.

Happy Learning !!!

java.lang.Double Class & Methods


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

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

See Also:

Constants

  • static int MAX_EXPONENT : Maximum exponent a finite double variable may have.
  • static double MAX_VALUE :A constant holding the largest positive finite value of type double, (2-2-52)·21023.
  • static int MIN_EXPONENT :Minimum exponent a normalized double variable may have.
  • static double MIN_NORMAL :A constant holding the smallest positive normal value of type double, 2-1022.
  • static double MIN_VALUE :A constant holding the smallest positive nonzero value of type double, 2-1074.
  • static double NaN :A constant holding a Not-a-Number (NaN) value of type double.
  • static double NEGATIVE_INFINITY :A constant holding the negative infinity of type double.
  • static double POSITIVE_INFINITY :A constant holding the positive infinity of type double.
  • static int SIZE :The number of bits used to represent a double value.
  • static Class TYPE :The Class instance representing the primitive type double.

Constructors

  • Double(double value) :Constructs a newly allocated Double object that represents the primitive double argument.
  • Double(String s) :Constructs a newly allocated Double object that represents the floating-point value of type double represented by the string.

Methods

  • byte byteValue() :Returns the value of this Double as a byte (by casting to a byte).
  • static int compare(double d1, double d2) :Compares the two specified double values.
  • int compareTo(Double anotherDouble) :Compares two Double objects numerically.
  • static long doubleToLongBits(double value) :Returns a representation of the specified floating-point value according to the IEEE 754 floating-point “double format” bit layout.
  • static long doubleToRawLongBits(double value) :Returns a representation of the specified floating-point value according to the IEEE 754 floating-point “double format” bit layout, preserving Not-a-Number (NaN) values.
  • double doubleValue() :Returns the double value of this Double object.
  • boolean equals(Object obj) :Compares this object against the specified object.
  • float floatValue() :Returns the float value of this Double object.
  • int hashCode() :Returns a hash code for this Double object.
  • int intValue() :Returns the value of this Double as an int (by casting to type int).
  • boolean isInfinite() :Returns true if this Double value is infinitely large in magnitude, false otherwise.
  • static boolean isInfinite(double v) :Returns true if the specified number is infinitely large in magnitude, false otherwise.
  • boolean isNaN() :Returns true if this Double value is a Not-a-Number (NaN), false otherwise.
  • static boolean isNaN(double v) :Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.
  • double longBitsToDouble(long bits) :Returns the double value corresponding to a given bit representation.
  • long longValue() :Returns the value of this Double as a long (by casting to type long).
  • static double parseDouble(String s) :Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
  • short shortValue() :Returns the value of this Double as a short (by casting to a short).
  • static String toHexString(double d) Returns a hexadecimal string representation of the double argument.
  • String toString() :Returns a string representation of this Double object.
  • static String toString(double d) :Returns a string representation of the double argument.
  • static Double valueOf(double d) :Returns a Double instance representing the specified double value.
  • static Double valueOf(String s) :Returns a Double object holding the double value represented by the argument string s.

Exceptions

References

Advertisements
Advertisements

Your Feedback Motivate Us

If our FacingIssuesOnIT Experts solutions guide you to resolve your issues and improve your knowledge. Please share your comments, like and subscribe to get notifications for our posts.

Happy Learning !!!