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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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()

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum


  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()

    View Answer

    Workspace

    Discuss Discuss in Forum


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

    View Answer

    Workspace

    Discuss Discuss in Forum