Java 8 Mock Test
Java 8 Mock Test
Mock Test IV
Answer : D
Explanation
https://www.tutorialspoint.com/java/java8_mock_test.htm 1/15
6/8/24, 3:55 PM Java 8 Mock Test
A - New compiler tools and utilities are added like 'jdeps' to figure out
dependencies.
Answer : D
Explanation
All of the above options are correct.
Answer : C
Explanation
https://www.tutorialspoint.com/java/java8_mock_test.htm 2/15
6/8/24, 3:55 PM Java 8 Mock Test
Answer : C
Explanation
Both of the above options are correct.
Answer : C
Explanation
https://www.tutorialspoint.com/java/java8_mock_test.htm 3/15
6/8/24, 3:55 PM Java 8 Mock Test
Answer : C
Explanation
Both of the above options are correct.
Answer : C
Explanation
Both of the above options are correct.
https://www.tutorialspoint.com/java/java8_mock_test.htm 4/15
6/8/24, 3:55 PM Java 8 Mock Test
Answer : A
Explanation
System.out::println method is a static method reference to println method of
out object of System class.
A - BiConsumer<T,U>
B - BiFunction<T,U,R>
C - BinaryOperator<T>
D - BiPredicate<T,U>
Answer : A
Explanation
BiConsumer<T,U> functional interface represents an operation that accepts
two input arguments, and returns no result.
https://www.tutorialspoint.com/java/java8_mock_test.htm 5/15
6/8/24, 3:55 PM Java 8 Mock Test
A - BiConsumer<T,U>
B - BiFunction<T,U,R>
C - BinaryOperator<T>
D - BiPredicate<T,U>
Answer : B
Explanation
BiFunction<T,U> functional interface represents an operation that accepts
two input arguments, and returns a result.
A - BiConsumer<T,U>
B - BiFunction<T,U,R>
C - BinaryOperator<T>
D - BiPredicate<T,U>
Answer : C
Explanation
BinaryOperator<T> functional interface represents an operation upon two
operands of the same type, producing a result of the same type as the
operands.
https://www.tutorialspoint.com/java/java8_mock_test.htm 6/15
6/8/24, 3:55 PM Java 8 Mock Test
A - BiConsumer<T,U>
B - BiFunction<T,U,R>
C - BinaryOperator<T>
D - BiPredicate<T,U>
Answer : D
Explanation
BiPredicate<T,U> functional interface represents a predicate (Boolean-
valued function) of two arguments.
A - BooleanSupplier
B - Consumer<T>
C - DoubleBinaryOperator
D - DoubleConsumer
Answer : A
Explanation
BooleanSupplier functional interface represents a supplier of Boolean-valued
results.
https://www.tutorialspoint.com/java/java8_mock_test.htm 7/15
6/8/24, 3:55 PM Java 8 Mock Test
A - BooleanSupplier
B - Consumer<T>
C - DoubleBinaryOperator
D - DoubleConsumer
Answer : B
Explanation
Consumer<T> functional interface represents an operation that accepts a
single input argument and returns no result.
A - BooleanSupplier
B - Consumer<T>
C - DoubleBinaryOperator
D - DoubleConsumer
Answer : C
Explanation
DoubleBinaryOperator functional interface represents an operation upon two
double-valued operands and producing a double-valued result.
https://www.tutorialspoint.com/java/java8_mock_test.htm 8/15
6/8/24, 3:55 PM Java 8 Mock Test
A - BooleanSupplier
B - Consumer<T>
C - DoubleBinaryOperator
D - DoubleConsumer
Answer : D
Explanation
DoubleConsumer functional interface represents an operation that accepts a
single double-valued argument and returns no result.
A - DoubleFunction<R>
B - DoublePredicate
C - DoubleSupplier
D - DoubleToIntFunction
Answer : A
Explanation
DoubleFunction<R> functional interface represents a function that accepts a
double-valued argument and produces a result.
https://www.tutorialspoint.com/java/java8_mock_test.htm 9/15
6/8/24, 3:55 PM Java 8 Mock Test
A - DoubleFunction<R>
B - DoublePredicate
C - DoubleSupplier
D - DoubleToIntFunction
Answer : B
Explanation
DoublePredicate functional interface represents a predicate (Boolean-valued
function) of one double-valued argument.
A - DoubleFunction<R>
B - DoublePredicate
C - DoubleSupplier
D - DoubleToIntFunction
Answer : C
Explanation
DoubleSupplier functional interface represents a supplier of double-valued
results.
https://www.tutorialspoint.com/java/java8_mock_test.htm 10/15
6/8/24, 3:55 PM Java 8 Mock Test
A - DoubleFunction<R>
B - DoublePredicate
C - DoubleSupplier
D - DoubleToIntFunction
Answer : D
Explanation
DoubleToIntFunction functional interface represents a function that accepts a
double-valued argument and produces an int-valued result.
A - DoubleToLongFunction
B - DoubleUnaryOperator
C - Function<T,R>
D - IntBinaryOperator
Answer : A
Explanation
DoubleToLongFunction functional interface represents a function that accepts
a double-valued argument and produces a long-valued result.
https://www.tutorialspoint.com/java/java8_mock_test.htm 11/15
6/8/24, 3:55 PM Java 8 Mock Test
A - DoubleToLongFunction
B - DoubleUnaryOperator
C - Function<T,R>
D - IntBinaryOperator
Answer : B
Explanation
DoubleUnaryOperator functional interface represents an operation on a
single double-valued operand that produces a double-valued result.
A - DoubleToLongFunction
B - DoubleUnaryOperator
C - Function<T,R>
D - IntBinaryOperator
Answer : C
Explanation
Function<T,R> functional interface represents a function that accepts one
argument and produces a result.
https://www.tutorialspoint.com/java/java8_mock_test.htm 12/15
6/8/24, 3:55 PM Java 8 Mock Test
A - DoubleToLongFunction
B - DoubleUnaryOperator
C - Function<T,R>
D - IntBinaryOperator
Answer : D
Explanation
FunctionIntBinaryOperator functional interface represents an operation upon
two int-valued operands and produces an int-valued result.
A - IntConsumer
B - IntFunction<R>
C - IntPredicate
D - IntSupplier
Answer : A
Explanation
IntConsumer functional interface represents an operation that accepts a
single int-valued argument and returns no result.
https://www.tutorialspoint.com/java/java8_mock_test.htm 13/15
6/8/24, 3:55 PM Java 8 Mock Test
1 D
2 D
3 C
4 C
5 C
6 C
7 C
8 A
9 A
10 B
11 C
12 D
13 A
14 B
15 C
16 D
17 A
18 B
19 C
20 D
21 A
22 B
23 C
24 D
https://www.tutorialspoint.com/java/java8_mock_test.htm 14/15
6/8/24, 3:55 PM Java 8 Mock Test
25 A
Download
https://www.tutorialspoint.com/java/java8_mock_test.htm 15/15