Difference between predicate, supplier and consumer ?



Difference between predicate, supplier and consumer ?..

Answer / Chaina Khatoon

In Java 8, Predicate is a functional interface that represents any operation on a single input that returns a boolean value. Supplier is an interface that represents a supplier of results, providing no input. Consumer is a functional interface that accepts one input (of any type) and returns nothing.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How do you declare a variable?

1 Answers  


How will you override default serialization mechanism in java

2 Answers  


State some situations where exceptions may arise in java?

1 Answers  


How does serialization work

3 Answers   Ordain Solutions,


How we can make copy of a java object?

1 Answers  


Can I declare class as static or private?

1 Answers  


What is a function easy definition?

1 Answers  


what is difference between type 4 driver and type 1 driver?

2 Answers   CMC, CTS, IBM, JK Technosoft, Napier Healthcare,


What is abstract class constructor called?

1 Answers  


How do generics work?

1 Answers  


Explain where variables are created in memory?

1 Answers  


How to display arraylist values in java?

1 Answers  


Categories