gs gs128 Java Autoboxing - Java 8 Features - Quiz No.1
gs gs128 Java Quiz
This quiz belongs to book/course code gs gs128 Java of gs organization. We have 136 quizzes available related to the book/course Java. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Java Autoboxing. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: Which of the following is not introduced with Java 8?
Stream API
Serialization
Spliterator
Lambda Expression
Question 2: What is the purpose of BooleanSupplier function interface?
represents supplier of Boolean-valued results
returns Boolean-valued result
There is no such function interface
returns null if Boolean is passed as argument
Question 3: What is the return type of lambda expression?
String
Object
void
Function
Question 4: Which is the new method introduced in java 8 to iterate over a collection?
for (String i : StringList)
foreach (String i : StringList)
StringList.forEach()
List.for()
Question 5: What are the two types of Streams offered by java 8?
sequential and parallel
sequential and random
parallel and random
random and synchronized
Question 6: Which feature of java 8 enables us to create a work stealing thread pool using all available processors at its target?
workPool
newWorkStealingPool
threadPool
workThreadPool
Question 7: What does Files.lines(Path path) do?
It reads all the files at the path specified as a String
It reads all the lines from a file as a Stream
It reads the filenames at the path specified
It counts the number of lines for files at the path specified
Question 8: What is Optional object used for?
Optional is used for optional runtime argument
Optional is used for optional spring profile
Optional is used to represent null with absent value
Optional means it’s not mandatory for method to return object
Question 9: What is the substitute of Rhino javascript engine in Java 8?
Nashorn
V8
Inscript
Narcissus
Question 10: What does SAM stand for in the context of Functional Interface?
Single Ambivalue Method
Single Abstract Method
Simple Active Markup
Simple Abstract Markup