'Accessing/printing ArrayList contents. I have operations as a parameter for getMax function. sent in is [1 97, 2, 1 20, 2, 1 26, 1 20, 2, 3, 1 91, 3]
Operation parameter is [1 97, 2, 1 20, 2, 1 26, 1 20, 2, 3, 1 91, 3] and class is java.util.ArrayList.
I get size of operation as 1, but I want to access each item after splitting at the comma. So 10 items that can be accessed via index or get(i)
public static List<Integer> getMax(List<String> operations) { }
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
