public static void main(String[] args) {
        List<Integer> ints = new ArrayList<Integer>();
        List<Double> doubles = new ArrayList<Double>();
        doubles.add(3.05);doubles.add(6.9);doubles.add(8.9);
        ints.add(3); ints.add(5); ints.add(10);

        double sum = sum(ints);
        double doubles1 = sum;
        System.out.println(doubles1);


        //Subtyping using Generics Wildcard
        List<? extends Integer> intList = new ArrayList<Integer>();
        List<? extends Number>  numList = intList;  // OK. List<? extends Integer> is a subtype of List<? extends Number>
        List<Number>  numbers = new ArrayList<Number>();

        List<String> stringList = new ArrayList<String>();
        stringList.add("Hello");

//        printData(stringList);
//        printData(ints);
        addIntegers(numbers);
//        System.out.println(numbers);

    }