Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write a function that will takes a List of ArrayList as a 1srt parameter and an integer as the 2nd parameter and return the average of each index value together as an ArrayList element of a List
- example:
- 1srt parameter = myList [[5, 6, 7, 8, 9], [3, 4, 5, 2, 4], [4, 3, 7, 9, 11], [6, 2, 3, 5, 8]]
- 2nd parameter = 4;
- And after execution of the function the return value is a list of the averages, in this case we only have 1:
- returned list: [[4, 7, 5, 6, 8]]
- public List<List<String>> computeAv(List<List<String>> myList, int avDegree) {
- List<List<String>> averagesList= new ArrayList<>();
- return averagesList;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement