Sharecodepoint App Download Qrcode Sharecodepoint Android App Banner
Now You can search anything in sharecodepoint using your voice. Click on mic button. Sharecodepoint Youtube Channel

Hi All, Please give your feedback on google. Your Feedback is Important to Us Write Feedback





Sharecodepoint popular queries

Tuesday, 3 October 2017

CSE406 : Advanced Java 8 MCQ Questions for Mid Term and End Term Exam - JDBC MCQ Questions, Interface MCQ Questions

Java 8 is a revolutionary release of the world's #1 development platform. It includes a huge upgrade to the Java programming model and a coordinated evolution of the JVM, Java language, and libraries.

1. Lambdas introduced in Java 8 allow us to treat -
a.Data as code
b.Code as data
c.none
d.all

2. The newly introduced Streams API is available in which package of java 8:
a.java.io.streams
b.java.io.stream
c.java.util.streams
d.java.util.stream

3. Which class can be used Instead of System.getCurrentTimeMillis() to get a date and time in Java 8 -
a.Clock
b.Date
c.Time
d.Timer

4. Lambda expressions in java 8 are based on
a.Procedural programming
b.Functional programming
c.Data programming
d.All

5. How many methods are there in functional interface in Java 8?
a.0
b.1
c.2
d.3

6. In Java 8 Interfaces, methods can be:
a.default
b.abstract
c.all
d.none

7. The Java 8 API with a sequence of elements which of these supports sequential and parallel aggregate operations -
a.Hadoop
b.Streams
c.SequenceProgramming
d.Big-data

8.Stream operations in java 8 can be divided into
a.Terminal types
b.Intermediate types
c.All
d.None

9. Which package contains Date/Time (JSR 310) API in Java 8 -
a.java.time
b.java.util.time
c.java.timedate
d.java.util.calendar

10. Nashorn the new JavaScript engine is an implementation of -
a.javax.engine.Engine
b.javax.script.Engine
c.javax.javaScript.Engine
d.javax.script.ScriptEngine

11. Which is new command line tool for the Nashhorn JavaScript engine in java 8 -
a.jcs
b.jfs
c.jjs
d.jss

12. Which of these should be used to show package-level and class-level dependencies of Class files in Java 8
a.dep
b.ideps
c.jdep
d.jdeps

13. Predicate is in which package in Java 8
a.java.util.predicate
b.java.util.object
c.java.util.objects
d.java.util.predict

14. Which of these represents a process that accepts one argument and produces a result in Java 8
a.Function
b.Process
c.Method
d.JavaFunctions

15. In java 8 Function is ?
a.Class
b.Interface
c.Lambda Expression
d.Object

16. PermGen space has been replaced with which of these in Java 8 -
a.PermSpace
b.PermSpaceGen
c.Metaspace
d.MetaGenSpace

17. What can help us in avoiding NullPointeExceptions and null checks in java 8 -
a.Optional
b.Required
c.NotNull
d.NotRequired

18. Code before Java 8 essentially used to be -
a.Declarative
b.Imperative
c.Subjective
d.None 

19. In java 8, R apply(T t) is a method of-
a.Function
b.Process
c.Predicate
d.None 

20. What is Predicate in Java 8 -
a.method
b.class
c.Interface
d.Framework

21. How sorting speed has been improved significantly on multi-core machines by using -
a.Arrays.parallelSort
b.Arrays.sort
c.Collection.parallelSort
d.Arrays.sortParallelly

22. Which is aggregate operation in Java 8
a.filter
b.map
c.forEach
d.All

23. Example of functional interfaces in Java 8 -
a.java.util.concurrent.Callable
b.java.lang.Runnable
c.All
d.None

24. Which method can be used to check null on an Optional variable in Java 8
a.isPresent()
b.isNullable()
c.isPresentable()
d.isNotNull

25. We need to override which Predicate method in Java 8 -
a.predict(T t)
b.predictable(T t)
c.testable(T t)
d.test(T t)

Correct answers

1) b     2) d     3) a     4) b     5) b     6) c     7) b     8) c     9) a     10) d     11) c     12) d     13) b     14) a     15) b     16) c     17) a     18) b     19) a     20) c     21) a     22) d     23) c     24) a     25) d

0 comments:

Post a Comment

 

Version 23.2.3.4 - 2016 - 2019 - © Sharecodepoint | Made in India. | Copyright Content