How to Split odd and even numbers and sum of both in collection using Stream
问题 how can I Split odd and even numbers and sum both in collection using Stream method of java-8 ?? public class SplitAndSumOddEven { public static void main(String[] args) { // Read the input try (Scanner scanner = new Scanner(System.in)) { // Read the number of inputs needs to read. int length = scanner.nextInt(); // Fillup the list of inputs List<Integer> inputList = new ArrayList<>(); for (int i = 0; i < length; i++) { inputList.add(scanner.nextInt()); } // TODO:: operate on inputs and