Basic Datatypes


  1. Which class is a library of functions to perform arithmetic operations of BigInteger and BigDecimal?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    MathContext class is a library of functions to perform arithmetic operations of BigInteger and BigDecimal.


  1. What is BigDecimal.ONE?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    BigDecimal.ONE is a static variable of BigDecimal class with value 1 on scale 0.



  1. BigDecimal is a part of which package?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    BigDecimal is a part of java.math. This package provides various classes for storing numbers and mathematical operations.


  1. Which of the following is not provided by BigDecimal?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    toBigInteger() converts BigDecimal to a BigInteger.toBigIntegerExact() converts this BigDecimal to a BigInteger by checking for lost information.



  1. Which of the following is not provided by BigDecimal?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    toBigInteger() converts BigDecimal to a BigInteger.toBigIntegerExact() converts this BigDecimal to a BigInteger by checking for lost information.