Defining Collections without specific type
        public static void main(String[] args) {
           Set vals = new TreeSet();
           vals.add("one");
           vals.add(1);
           vals.add("two");
           System.out.println(vals);
    }

(i)-What does it mean to define a collection without giving it a type?For what purpose
does it made for?

(ii)-Can I add different type to the collection any way?

Here's an example- There's no compilation error, though it's warning me.

But, as excepted, there's a run time error. 



Defining Collections without specific type
===

        public static void main(String[] args) {
           Set vals = new TreeSet();
           vals.add("one");
           vals.add(1);
           vals.add("two");
           System.out.println(vals);
    }

(i)-What does it mean to define a collection without giving it a type?For what purpose
does it made for?

(ii)-Can I add different type to the collection any way?

Here's an example- There's no compilation error, though it's warning me.

But, as excepted, there's a run time error. 


