Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Java 8 Interview Questions and Answers For Freshers Part-1

Be First!

java81.What are functional interfaces?
Functional interfaces have a single functionality to exhibit. For example, a Comparable interface with a single method ‘compareTo’ is used for comparison purpose. Java 8 has defined a lot of functional interfaces to be used extensively in lambda expressions.

2.What is the purpose of BiConsumer<T,U> functional interface?
It represents an operation that accepts two input arguments, and returns no result.

3.What is the purpose of BiFunction<T,U,R> functional interface?
It represents a function that accepts two arguments and produces a result.

4.What is the purpose of BinaryOperator<T> functional interface?
It represents an operation upon two operands of the same type, producing a result of the same type as the operands.

5.What is the purpose of BiPredicate<T,U> functional interface?
It represents a predicate (Boolean-valued function) of two arguments.

6.What is the purpose of BooleanSupplier functional interface?
It represents a supplier of Boolean-valued results.

7.What is the purpose of Consumer<T> functional interface?
It represents an operation that accepts a single input argument and returns no result.

8.What is the purpose of DoubleBinaryOperator functional interface?
It represents an operation upon two double-valued operands and producing a double-valued result.

9.What is the purpose of DoubleConsumer functional interface?
It represents an operation that accepts a single double-valued argument and returns no result.

10.What is the purpose of DoubleFunction<R> functional interface?
It represents a function that accepts a double-valued argument and produces a result.

(186)

Previous
Next

Leave a Reply