Question 118 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question 118 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question

Given the code fragment:

Map<Integer, Integer> mVal = new HashMap<>()7
mVal.put (i, 10);

mval.put (2, 20);

//line n1

c.accept (1, 2);

mVal.forEach(c)

Which statement can be inserted into line n1 to print 1,2; 1,10; 2,20;?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.

https://www.concretepage.com/java/jdk-8/java-8-biconsumer-bifunction-bipredicate-example