| Package | Description | 
|---|---|
| java.math | Provides classes for performing arbitrary-precision integer
 arithmetic ( BigInteger) and arbitrary-precision decimal
 arithmetic (BigDecimal). | 
| java.sql | Provides the API for accessing and processing data stored in a 
data source (usually a relational database) using the 
JavaTM programming language. | 
| java.util | Contains the collections framework, legacy collection classes, event model,
date and time facilities, internationalization, and miscellaneous utility
classes (a string tokenizer, a random-number generator, and a bit array). | 
| javax.management.openmbean | Provides the open data types and Open MBean descriptor classes. | 
| javax.sql | Provides the API for server side data source access and processing from
the JavaTM programming language. | 
| javax.sql.rowset | Standard interfaces and base classes for JDBC  RowSetimplementations. | 
| javax.sql.rowset.serial | Provides utility classes to allow serializable mappings between SQL types
and data types in the Java programming language. | 
| javax.xml.bind | 
 Provides a runtime binding framework for client applications including
 unmarshalling, marshalling, and validation capabilities. | 
| javax.xml.datatype | XML/Java Type Mappings. | 
| org.omg.CORBA | Provides the mapping of the OMG CORBA APIs to the JavaTM
programming language, including the class ORB, which is implemented
so that a programmer can use it as a fully-functional Object Request Broker
(ORB). | 
| org.omg.CORBA.portable | Provides a portability layer, that is, a set of ORB APIs
that makes it possible for code generated
by one vendor to run on another vendor's ORB. | 
| Modifier and Type | Field | Description | 
|---|---|---|
| static BigDecimal  | BigDecimal. ONE The value 1, with a scale of 0. | |
| static BigDecimal  | BigDecimal. TEN The value 10, with a scale of 0. | |
| static BigDecimal  | BigDecimal. ZERO The value 0, with a scale of 0. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BigDecimal  | BigDecimal. abs ()Returns a  BigDecimalwhose value is the absolute value
 of thisBigDecimal, and whose scale isthis.scale(). | |
| BigDecimal  | BigDecimal. abs (MathContext mc)Returns a  BigDecimalwhose value is the absolute value
 of thisBigDecimal, with rounding according to the
 context settings. | |
| BigDecimal  | BigDecimal. add (BigDecimal augend)Returns a  BigDecimalwhose value is(this +
 augend), and whose scale ismax(this.scale(),
 augend.scale()). | |
| BigDecimal  | BigDecimal. add (BigDecimal augend,
 MathContext mc)Returns a  BigDecimalwhose value is(this + augend),
 with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor)Returns a  BigDecimalwhose value is(this /
 divisor), and whose preferred scale is(this.scale() -
 divisor.scale()); if the exact quotient cannot be
 represented (because it has a non-terminating decimal
 expansion) anArithmeticExceptionis thrown. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 int roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale isthis.scale(). | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 int scale,
 int roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale is as specified. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 int scale,
 RoundingMode roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale is as specified. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 MathContext mc)Returns a  BigDecimalwhose value is(this /
 divisor), with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 RoundingMode roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale isthis.scale(). | |
| BigDecimal[] | BigDecimal. divideAndRemainder (BigDecimal divisor)Returns a two-element  BigDecimalarray containing the
 result ofdivideToIntegralValuefollowed by the result ofremainderon the two operands. | |
| BigDecimal[] | BigDecimal. divideAndRemainder (BigDecimal divisor,
 MathContext mc)Returns a two-element  BigDecimalarray containing the
 result ofdivideToIntegralValuefollowed by the result ofremainderon the two operands calculated with rounding
 according to the context settings. | |
| BigDecimal  | BigDecimal. divideToIntegralValue (BigDecimal divisor)Returns a  BigDecimalwhose value is the integer part
 of the quotient(this / divisor)rounded down. | |
| BigDecimal  | BigDecimal. divideToIntegralValue (BigDecimal divisor,
 MathContext mc)Returns a  BigDecimalwhose value is the integer part
 of(this / divisor). | |
| BigDecimal  | BigDecimal. max (BigDecimal val)Returns the maximum of this  BigDecimalandval. | |
| BigDecimal  | BigDecimal. min (BigDecimal val)Returns the minimum of this  BigDecimalandval. | |
| BigDecimal  | BigDecimal. movePointLeft (int n)Returns a  BigDecimalwhich is equivalent to this one
 with the decimal point movednplaces to the left. | |
| BigDecimal  | BigDecimal. movePointRight (int n)Returns a  BigDecimalwhich is equivalent to this one
 with the decimal point movednplaces to the right. | |
| BigDecimal  | BigDecimal. multiply (BigDecimal multiplicand)Returns a  BigDecimalwhose value is (this ×
 multiplicand), and whose scale is(this.scale() +
 multiplicand.scale()). | |
| BigDecimal  | BigDecimal. multiply (BigDecimal multiplicand,
 MathContext mc)Returns a  BigDecimalwhose value is (this ×
 multiplicand), with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. negate ()Returns a  BigDecimalwhose value is(-this),
 and whose scale isthis.scale(). | |
| BigDecimal  | BigDecimal. negate (MathContext mc)Returns a  BigDecimalwhose value is(-this),
 with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. plus ()Returns a  BigDecimalwhose value is(+this), and whose
 scale isthis.scale(). | |
| BigDecimal  | BigDecimal. plus (MathContext mc)Returns a  BigDecimalwhose value is(+this),
 with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. pow (int n)Returns a  BigDecimalwhose value is
 (thisn), The power is computed exactly, to
 unlimited precision. | |
| BigDecimal  | BigDecimal. pow (int n,
 MathContext mc)Returns a  BigDecimalwhose value is
 (thisn). | |
| BigDecimal  | BigDecimal. remainder (BigDecimal divisor)Returns a  BigDecimalwhose value is(this % divisor). | |
| BigDecimal  | BigDecimal. remainder (BigDecimal divisor,
 MathContext mc)Returns a  BigDecimalwhose value is(this %
 divisor), with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. round (MathContext mc)Returns a  BigDecimalrounded according to theMathContextsettings. | |
| BigDecimal  | BigDecimal. scaleByPowerOfTen (int n)Returns a BigDecimal whose numerical value is equal to
 ( this* 10n). | |
| BigDecimal  | BigDecimal. setScale (int newScale)Returns a  BigDecimalwhose scale is the specified
 value, and whose value is numerically equal to thisBigDecimal's. | |
| BigDecimal  | BigDecimal. setScale (int newScale,
 int roundingMode)Returns a  BigDecimalwhose scale is the specified
 value, and whose unscaled value is determined by multiplying or
 dividing thisBigDecimal's unscaled value by the
 appropriate power of ten to maintain its overall value. | |
| BigDecimal  | BigDecimal. setScale (int newScale,
 RoundingMode roundingMode)Returns a  BigDecimalwhose scale is the specified
 value, and whose unscaled value is determined by multiplying or
 dividing thisBigDecimal's unscaled value by the
 appropriate power of ten to maintain its overall value. | |
| BigDecimal  | BigDecimal. stripTrailingZeros ()Returns a  BigDecimalwhich is numerically equal to
 this one but with any trailing zeros removed from the
 representation. | |
| BigDecimal  | BigDecimal. subtract (BigDecimal subtrahend)Returns a  BigDecimalwhose value is(this -
 subtrahend), and whose scale ismax(this.scale(),
 subtrahend.scale()). | |
| BigDecimal  | BigDecimal. subtract (BigDecimal subtrahend,
 MathContext mc)Returns a  BigDecimalwhose value is(this - subtrahend),
 with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. ulp ()Returns the size of an ulp, a unit in the last place, of this
  BigDecimal. | |
| static BigDecimal  | BigDecimal. valueOf (double val)Translates a  doubleinto aBigDecimal, using
 thedouble's canonical string representation provided
 by theDouble.toString(double)method. | |
| static BigDecimal  | BigDecimal. valueOf (long val)Translates a  longvalue into aBigDecimalwith a scale of zero. | |
| static BigDecimal  | BigDecimal. valueOf (long unscaledVal,
 int scale)Translates a  longunscaled value and anintscale into aBigDecimal. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BigDecimal  | BigDecimal. add (BigDecimal augend)Returns a  BigDecimalwhose value is(this +
 augend), and whose scale ismax(this.scale(),
 augend.scale()). | |
| BigDecimal  | BigDecimal. add (BigDecimal augend,
 MathContext mc)Returns a  BigDecimalwhose value is(this + augend),
 with rounding according to the context settings. | |
| int | BigDecimal. compareTo (BigDecimal val)Compares this  BigDecimalwith the specifiedBigDecimal. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor)Returns a  BigDecimalwhose value is(this /
 divisor), and whose preferred scale is(this.scale() -
 divisor.scale()); if the exact quotient cannot be
 represented (because it has a non-terminating decimal
 expansion) anArithmeticExceptionis thrown. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 int roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale isthis.scale(). | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 int scale,
 int roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale is as specified. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 int scale,
 RoundingMode roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale is as specified. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 MathContext mc)Returns a  BigDecimalwhose value is(this /
 divisor), with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. divide (BigDecimal divisor,
 RoundingMode roundingMode)Returns a  BigDecimalwhose value is(this /
 divisor), and whose scale isthis.scale(). | |
| BigDecimal[] | BigDecimal. divideAndRemainder (BigDecimal divisor)Returns a two-element  BigDecimalarray containing the
 result ofdivideToIntegralValuefollowed by the result ofremainderon the two operands. | |
| BigDecimal[] | BigDecimal. divideAndRemainder (BigDecimal divisor,
 MathContext mc)Returns a two-element  BigDecimalarray containing the
 result ofdivideToIntegralValuefollowed by the result ofremainderon the two operands calculated with rounding
 according to the context settings. | |
| BigDecimal  | BigDecimal. divideToIntegralValue (BigDecimal divisor)Returns a  BigDecimalwhose value is the integer part
 of the quotient(this / divisor)rounded down. | |
| BigDecimal  | BigDecimal. divideToIntegralValue (BigDecimal divisor,
 MathContext mc)Returns a  BigDecimalwhose value is the integer part
 of(this / divisor). | |
| BigDecimal  | BigDecimal. max (BigDecimal val)Returns the maximum of this  BigDecimalandval. | |
| BigDecimal  | BigDecimal. min (BigDecimal val)Returns the minimum of this  BigDecimalandval. | |
| BigDecimal  | BigDecimal. multiply (BigDecimal multiplicand)Returns a  BigDecimalwhose value is (this ×
 multiplicand), and whose scale is(this.scale() +
 multiplicand.scale()). | |
| BigDecimal  | BigDecimal. multiply (BigDecimal multiplicand,
 MathContext mc)Returns a  BigDecimalwhose value is (this ×
 multiplicand), with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. remainder (BigDecimal divisor)Returns a  BigDecimalwhose value is(this % divisor). | |
| BigDecimal  | BigDecimal. remainder (BigDecimal divisor,
 MathContext mc)Returns a  BigDecimalwhose value is(this %
 divisor), with rounding according to the context settings. | |
| BigDecimal  | BigDecimal. subtract (BigDecimal subtrahend)Returns a  BigDecimalwhose value is(this -
 subtrahend), and whose scale ismax(this.scale(),
 subtrahend.scale()). | |
| BigDecimal  | BigDecimal. subtract (BigDecimal subtrahend,
 MathContext mc)Returns a  BigDecimalwhose value is(this - subtrahend),
 with rounding according to the context settings. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BigDecimal  | CallableStatement. getBigDecimal (int parameterIndex)Retrieves the value of the designated JDBC  NUMERICparameter as ajava.math.BigDecimalobject with as many digits to the
 right of the decimal point as the value contains. | |
| BigDecimal  | ResultSet. getBigDecimal (int columnIndex)Retrieves the value of the designated column in the current row
 of this  ResultSetobject as ajava.math.BigDecimalwith full precision. | |
| BigDecimal  | CallableStatement. getBigDecimal (int parameterIndex,
 int scale)Deprecated. 
 use  getBigDecimal(int parameterIndex)orgetBigDecimal(String parameterName) | |
| BigDecimal  | ResultSet. getBigDecimal (int columnIndex,
 int scale)Deprecated. 
 Use  getBigDecimal(int columnIndex)orgetBigDecimal(String columnLabel) | |
| BigDecimal  | CallableStatement. getBigDecimal (String parameterName)Retrieves the value of a JDBC  NUMERICparameter as ajava.math.BigDecimalobject with as many digits to the
 right of the decimal point as the value contains. | |
| BigDecimal  | ResultSet. getBigDecimal (String columnLabel)Retrieves the value of the designated column in the current row
 of this  ResultSetobject as ajava.math.BigDecimalwith full precision. | |
| BigDecimal  | ResultSet. getBigDecimal (String columnLabel,
 int scale)Deprecated. 
 Use  getBigDecimal(int columnIndex)orgetBigDecimal(String columnLabel) | |
| BigDecimal  | SQLInput. readBigDecimal ()Reads the next attribute in the stream and returns it as a  java.math.BigDecimalobject in the Java programming language. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | PreparedStatement. setBigDecimal (int parameterIndex,
 BigDecimal x)Sets the designated parameter to the given  java.math.BigDecimalvalue. | |
| void | CallableStatement. setBigDecimal (String parameterName,
 BigDecimal x)Sets the designated parameter to the given
  java.math.BigDecimalvalue. | |
| void | ResultSet. updateBigDecimal (int columnIndex,
 BigDecimal x)Updates the designated column with a  java.math.BigDecimalvalue. | |
| void | ResultSet. updateBigDecimal (String columnLabel,
 BigDecimal x)Updates the designated column with a  java.sql.BigDecimalvalue. | |
| void | SQLOutput. writeBigDecimal (BigDecimal x)Writes the next attribute to the stream as a java.math.BigDecimal object. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BigDecimal  | Scanner. nextBigDecimal ()Scans the next token of the input as a  BigDecimal. | 
| Modifier and Type | Field | Description | 
|---|---|---|
| static SimpleType<BigDecimal> | SimpleType. BIGDECIMAL The  SimpleTypeinstance describing values whose
 Java class name isjava.math.BigDecimal. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | RowSet. setBigDecimal (int parameterIndex,
 BigDecimal x)Sets the designated parameter in this  RowSetobject's command
 to the givenjava.math.BigDeciamlvalue. | |
| void | RowSet. setBigDecimal (String parameterName,
 BigDecimal x)Sets the designated parameter to the given
  java.math.BigDecimalvalue. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | BaseRowSet. setBigDecimal (int parameterIndex,
 BigDecimal x)Sets the designated parameter to the given
  java.lang.BigDecimalvalue. | |
| void | BaseRowSet. setBigDecimal (String parameterName,
 BigDecimal x)Sets the designated parameter to the given
  java.math.BigDecimalvalue. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BigDecimal  | SQLInputImpl. readBigDecimal ()Retrieves the next attribute in this  SQLInputImplobject
 as ajava.math.BigDecimal. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | SQLOutputImpl. writeBigDecimal (BigDecimal x)Writes a  java.math.BigDecimalobject in the Java programming
 language to thisSQLOutputImplobject. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static BigDecimal  | DatatypeConverter. parseDecimal (String lexicalXSDDecimal)
 Converts the string argument into a BigDecimal value. | |
| BigDecimal  | DatatypeConverterInterface. parseDecimal (String lexicalXSDDecimal)
 Converts the string argument into a BigDecimal value. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static String  | DatatypeConverter. printDecimal (BigDecimal val)
 Converts a BigDecimal value into a string. | |
| String  | DatatypeConverterInterface. printDecimal (BigDecimal val)
 Converts a BigDecimal value into a string. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| abstract BigDecimal  | XMLGregorianCalendar. getFractionalSecond ()Return fractional seconds. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| abstract Duration  | Duration. multiply (BigDecimal factor)Computes a new duration whose value is  factortimes
 longer than the value of this duration. | |
| abstract Duration  | DatatypeFactory. newDuration (boolean isPositive,
 BigInteger years,
 BigInteger months,
 BigInteger days,
 BigInteger hours,
 BigInteger minutes,
 BigDecimal seconds)Obtain a new instance of a  Durationspecifying theDurationas isPositive, years, months, days, hours, minutes, seconds. | |
| abstract XMLGregorianCalendar  | DatatypeFactory. newXMLGregorianCalendar (BigInteger year,
 int month,
 int day,
 int hour,
 int minute,
 int second,
 BigDecimal fractionalSecond,
 int timezone)Constructor allowing for complete value spaces allowed by
 W3C XML Schema 1.0 recommendation for xsd:dateTime and related
 builtin datatypes. | |
| XMLGregorianCalendar  | DatatypeFactory. newXMLGregorianCalendarTime (int hours,
 int minutes,
 int seconds,
 BigDecimal fractionalSecond,
 int timezone)Create a Java instance of XML Schema builtin datatype time. | |
| abstract void | XMLGregorianCalendar. setFractionalSecond (BigDecimal fractional)Set fractional seconds. | |
| void | XMLGregorianCalendar. setTime (int hour,
 int minute,
 int second,
 BigDecimal fractional)Set time as one unit, including the optional infinite precision
 fractional seconds. | 
| Modifier and Type | Field | Description | 
|---|---|---|
| BigDecimal  | FixedHolder. value The value held by the FixedHolder | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BigDecimal  | Any. extract_fixed ()Extracts the  java.math.BigDecimalobject in thisAnyobject'svaluefield. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | Any. insert_fixed (BigDecimal value)Throws an 
  org.omg.CORBA.NO_IMPLEMENTexception. | |
| void | Any. insert_fixed (BigDecimal value,
 TypeCode type)Throws an 
  org.omg.CORBA.NO_IMPLEMENTexception. | 
| Constructor | Description | 
|---|---|
| FixedHolder (BigDecimal initial)Construct the FixedHolder and initialize it with the given value. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BigDecimal  | InputStream. read_fixed ()Reads a BigDecimal number. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | OutputStream. write_fixed (BigDecimal value)Writes a BigDecimal number. | 
 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, 2025, 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.