JavaScript is disabled on your browser.
Java™ Platform
Standard Ed. 7
java.lang

Class Number

    • Constructor Summary

      Constructors
      Constructor and Description
      Number ()
    • Method Summary

      Methods
      Modifier and Type Method and Description
      byte byteValue ()
      Returns the value of the specified number as a byte.
      abstract double doubleValue ()
      Returns the value of the specified number as a double.
      abstract float floatValue ()
      Returns the value of the specified number as a float.
      abstract int intValue ()
      Returns the value of the specified number as an int.
      abstract long longValue ()
      Returns the value of the specified number as a long.
      short shortValue ()
      Returns the value of the specified number as a short.
    • Constructor Detail

      • Number

        public Number()
    • Method Detail

      • intValue

        public abstract int intValue()
        Returns the value of the specified number as an int. This may involve rounding or truncation.
        Returns:
        the numeric value represented by this object after conversion to type int.
      • longValue

        public abstract long longValue()
        Returns the value of the specified number as a long. This may involve rounding or truncation.
        Returns:
        the numeric value represented by this object after conversion to type long.
      • floatValue

        public abstract float floatValue()
        Returns the value of the specified number as a float. This may involve rounding.
        Returns:
        the numeric value represented by this object after conversion to type float.
      • doubleValue

        public abstract double doubleValue()
        Returns the value of the specified number as a double. This may involve rounding.
        Returns:
        the numeric value represented by this object after conversion to type double.
      • byteValue

        public byte byteValue()
        Returns the value of the specified number as a byte. This may involve rounding or truncation.
        Returns:
        the numeric value represented by this object after conversion to type byte.
        Since:
        JDK1.1
      • shortValue

        public short shortValue()
        Returns the value of the specified number as a short. This may involve rounding or truncation.
        Returns:
        the numeric value represented by this object after conversion to type short.
        Since:
        JDK1.1
Java™ Platform
Standard Ed. 7

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Scripting on this page tracks web page traffic, but does not change the content in any way.

AltStyle によって変換されたページ (->オリジナル) /