Home / CSE MCQs / JAVA MCQs :: java.lang Package

CSE MCQs :: JAVA MCQs

  1. Which of these classes is not included in java.lang?
  2. A.
    Byte
    B.
    Integer
    C.
    Array
    D.
    Class

  3. Which of these is a process of converting a simple data type into a class?
  4. A.
    type wrapping
    B.
    type conversion
    C.
    type casting
    D.
    None of the Mentioned

  5. Which of these is a super class of wrappers Double & Integer?
  6. A.
    Long
    B.
    Digits
    C.
    Float
    D.
    Number

  7. Which of these is wrapper for simple data type float?
  8. A.
    float
    B.
    double
    C.
    Float
    D.
    Double

  9. Which of the following is method of wrapper Float for converting the value of an object into byte?
  10. A.
    bytevalue()
    B.
    byte bytevalue()
    C.
    Bytevalue()
    D.
    Byte Bytevalue()

  11. Which of these methods is used to check for infinitely large and small values?
  12. A.
    isInfinite()
    B.
    isNaN()
    C.
    Isinfinite()
    D.
    IsNaN()

  13. Which of the following package stores all the simple data types in java?
  14. A.
    lang
    B.
    java
    C.
    util
    D.
    java.packages

  15. Which of these is a wrapper for data type int?
  16. A.
    Integer
    B.
    Long
    C.
    Byte
    D.
    Both a & b

  17. Which of the following methods is a method of wrapper Integer for obtaining hash code for the invoking object?
  18. A.
    int hash()
    B.
    int hashcode()
    C.
    int hashCode()
    D.
    Integer hashcode()

  19. Which of these is a super class of wrappers Long, Character & Integer?
  20. A.
    Long
    B.
    Digits
    C.
    Float
    D.
    Number