Return to site

JAVA CERTIFICATION QUESTION: Can a lambda return a lambda?

=>Code with lambda expressions can be hard to understand, but one of the tricks that can help is to break things down into smaller chunks.

· java

Given the following

public void doIt() {
  /* insert here */ v1 = () -> a -> {};
}

Which of the following correctly completes the code when used to entirely replace the comment /* insert here */? Choose one.

A. Var
B. Supplier<Consumer<?>>
C. Function<Consumer<?>,?>
D. Function<Predicate<?>,?>
E. Consumer<Function<?,?>>

 

 

 

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