
- Java 8 Tutorial
- Java 8 - Home
- Java 8 - Overview
- Java 8 - Environment Setup
- Java 8 - Lambda Expressions
- Java 8 - Method References
- Java 8 - Functional Interfaces
- Java 8 - Default Methods
- Java 8 - Streams
- Java 8 - Optional Class
- Java 8 - Nashorn JavaScript
- Java 8 - New Date/Time API
- Java 8 - Base64
- Java 8 Useful Resources
- Java 8 - Questions and Answers
- Java 8 - Quick Guide
- Java 8 - Useful Resources
- Java 8 - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java 8 Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Java 8. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Q 1 - Which of the following is correct about Java 8 method references?
A - Method references help to point to methods by their names.
B - A method reference is described using :: (double colon) symbol.
Answer : C
Explanation
Both of the above options are correct.
Q 2 - Which of the following functional interface represents an operation that accepts a single double-valued argument and returns no result?
Answer : D
Explanation
DoubleConsumer functional interface represents an operation that accepts a single double-valued argument and returns no result.
Q 3 - Which of the following functional interface represents a function that accepts one argument and produces a result?
Answer : C
Explanation
Function<T,R> functional interface represents a function that accepts one argument and produces a result.
Q 4 - Which of the following functional interface represents a supplier of long-valued results?
Answer : D
Explanation
LongSupplier functional interface represents a supplier of long-valued results.
Q 5 - Which of the following functional interface represents a supplier of results?
Answer : D
Explanation
Supplier<T> functional interface represents a supplier of results.
Q 6 - Which of the following functional interface represents an operation on a single operand that produces a result of the same type as its operand?
Answer : C
Explanation
UnaryOperator<T> functional interface represents an operation on a single operand that produces a result of the same type as its operand.
Q 7 - Which of the following class implements an encoder for encoding byte data using the Base64 encoding scheme in Java8?
Answer : B
Explanation
static class Base64.Encoder - This class implements an encoder for encoding byte data using the Base64 encoding scheme as specified in RFC 4648 and RFC 2045.
Q 8 - Which of the following method of Base64 class returns a Base64.Encoder that encodes using the Basic type base64 encoding scheme?
Answer : B
Explanation
getEncoder() method of Base64 class returns a Base64.Encoder that encodes using the Basic type base64 encoding scheme.
Answer : A
Explanation
Method references help to point to methods by their names.
Answer : B
Explanation
Optional.get method gets the value, value should be present.