public static void main(String[] args) {

        List<Integer> numberList = new ArrayList<Integer>();

        numberList.add(5);
        numberList.add(6);
        numberList.add(7);

        //sum of all numbers
//        sumWithCondition(numbers, n -> true);
//sum of all even numbers
        sumWithCondition(numberList, i -> i % 2 == 0);
//sum of all numbers greater than 5
//        sumWithCondition(numbers, i -> i>5);


        numberList.forEach(n -> System.out.println(n));


    }