Collections can be of a particular type i.e they are only allowed to hold objects of a defined type. This is called “bounded by”. For example: Java Code: ArrayList arrayList = new ArrayList(); Vector vector = new Vector(); We declared an ArrayList and a Vector both bounded by String. We cannot store objects other than String in these. Lets try to store an integer in Vector and see what happens. Java Code: Vector vector = new Vector(); ...
ArrayList arrayList = new ArrayList(); Vector vector = new Vector();
Vector vector = new Vector();
thanks...
sorry for all the questions
thanks...
06-14-2013, 02:22 PM in gbonecapone