Given the code fragment: BiFunction<Integer, Double, Integer> val = (t1, t2) -> t1 + t2; //line n1 //line n2 System.out.println(val.apply(10, 10.5)); What is the result?
Autounboxing is needed for the values to be added. The main point here is when we add a double to an int , double is returned . So if we had BiFunction<Integer,Double,Double> it would compile file. The answer is C
Bad return type in lambda expression: double cannot be converted to Integer in line n1 so answer C
upvoted 3 times
...
This section is not available anymore. Please use the main Exam Page.1z0-809 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
jduarte
Highly Voted 3 years, 11 months agoAVB22
3 years, 1 month agoasdfjhfgjuaDCV
Most Recent 9 months, 3 weeks agosteefaand
10 months, 3 weeks agoiSnover
10 months, 3 weeks agoWilsonKKerll
2 years, 9 months agogriglad
2 years, 10 months agofffff
3 years, 10 months ago