Home / CSE MCQs / Java 8 ::

CSE MCQs :: Java 8

  1. PermGen space has been replaced with which of these in Java 8
  2. A.
    PermSpace
    B.
    PermSpaceGen
    C.
    Metaspace
    D.
    MetaGenSpace

  3. Which of the following does not belong: If a class inherits from some other class, it should
  4. A.
    Make use of the parent class's capabilities
    B.
    Over-ride or add the minimum to accomplish the derived class' purpose
    C.
    Over-ride all the methods of its parent class
    D.
    Make sure the result IS-A-KIND-OF" its base class

  5. Using which keyword we can access a value of the instance variables and class variables of that class inside the method of that class itself.
  6. A.
    Super
    B.
    Final
    C.
    This
    D.
    Either super or this

  7. Example of functional interfaces
  8. A.
    java.util.concurrent.Callable
    B.
    java.lang.Runnable
    C.
    All
    D.
    None

  9. Which is aggregate operation in Java 8
  10. A.
    filter
    B.
    map
    C.
    forEach
    D.
    All

  11. If a variable is declared final, it must include ¦¦¦¦¦¦¦. value.
  12. A.
    integer
    B.
    no
    C.
    initial
    D.
    float

  13. What is the return type of lambda expression?
  14. A.
    String
    B.
    Object
    C.
    void
    D.
    Function

  15. Which statement is true regarding an object?
  16. A.
    An object is what classes instantiated are from
    B.
    An object is an instance of a class
    C.
    An object is a variable
    D.
    An object is a reference to an attribute

  17. A functional interface acts as target types for which of the following?
  18. A.
    Lambda expression
    B.
    Method reference
    C.
    Constructor reference
    D.
    All of the above

  19. Which of these does Stream map() operates on
  20. A.
    Class
    B.
    Interface
    C.
    Predicate
    D.
    Function