Package modernfeatures
Class ConsumerExample
java.lang.Object
modernfeatures.ConsumerExample
Demonstrates the built-in
Consumer<T>
functional interface.
Consumer<T>
takes a single input and returns nothing (void).
It is commonly used for performing actions like printing, logging, etc.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ConsumerExample
public ConsumerExample()
-
-
Method Details
-
main
-