Return to site

JAVA CERTIFICATION QUESTION: Java andThen methods for consumers and functions

· java,ocp

In Java, a Consumer method’s role is to execute a side effect such as printing to the console, logging an event, or writing to a database.

Given the following two classes:

What is the output? Choose one.

A. 11

B. 12

C. 21

D. 22

E. There is no output.






·ꓭ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ


All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!