Question: Which method reference can replace the lambda in the first line of the main() method to produce the same output? A. System:out:println B. System::out:println C.
Which method reference can replace the lambda in the first line of the main() method to produce the same output?

A. System:out:println
B. System::out:println
C. System::out::println
D. System.out::println
E. None of the above.
interface Marsupial { void carryInPouch (int size); } public class Opossum { public static void main(String[] args) { Marsupial mar = x -> System.out.println ("Carrying } } mar.carryInPouch (1); 11 + x);
Step by Step Solution
3.49 Rating (146 Votes )
There are 3 Steps involved in it
The given code snippet in the image shows the Opossum class with a main method that creates an insta... View full answer
Get step-by-step solutions from verified subject matter experts
