Given the code fragment: List<Integer> nums = Arrays.asList (10, 20, 8): System.out.println ( //line n1 ); line n1 to enable the code to print the maximum number in the nums list? Which code fragment must be inserted at
A.
nums.stream().max(Comparator.comparing(a -> a)).get()
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.
Destroyer
Highly Voted 4 years, 7 months agoasdfjhfgjuaDCV
Most Recent 4 months, 3 weeks agoiSnover
5 months, 3 weeks agosteefaand
5 months, 3 weeks agoAlazem
10 months ago