# List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5); java8

List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);

## 1 Answer

0 votes

Following code will print the highest number present in a list.

List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);

IntSummaryStatistics stats = integers.stream().mapToInt((x) -> x).summaryStatistics();

System.out.println("Highest number in List : " + stats.getMax());

## Related questions

0 votes
List numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);...
0 votes
List numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);...
0 votes
List numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);...
0 votes
List numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);...
0 votes
How is Arrays.asList() different than the standard way of initialising List? (a) Both are same (b) ... Collections Framework of Java Select the correct answer from above options...
0 votes
How is Arrays.asList() different than the standard way of initialising List? (a) Both are same (b) ... programming questions and answers pdf, java interview questions for beginners...
0 votes
List strings = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl");...
0 votes
Liststrings = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl");...
0 votes
A game of chance consists of spinning an arrow, which comes to rest pointing at one of the numbers 1, 2, 3, 4, ... at any factor of 8. Select the correct answer from above options...
0 votes
A game of chance consists of spinning an arrow, which comes to rest pointing at one of the numbers 1,2,3,4,5,6 ... at any factor of 8. Select the correct answer from above options...
0 votes
In a game of chance, a spinning arrow comes to rest at one of the numbers 1, 2, 3, 4, 5, 6, 7, 8. All ... 2. iv. a number less than 9. Select the correct answer from above options...
0 votes
>>> list(range(0, -9,-1)) will print [-1, -2, -3, -4,-5, -6, -7, -8) [0,-1, -2, -3, -4,-5, -6, -7, -8 ... [0,-1, -2, -3, -4,-5, -6, -7] Select the correct answer from above options...
0 votes
Question No.1: What do you understand about container tag and empty tag, give example? Question No.2: What do ... all the attributes? Select the correct answer from above options...
0 votes
Write a function in python to sort n numbers of integer stored in a list passed as parameter in function selesort(L[],n) Select the correct answer from above options...
0 votes
How will you get the sum of all numbers present in a list using Java 8 in Java8?...