this is my collection which I make:
Test<v> map = new Test<V>();
but when I call sort method which I override it in Test class and also map1 is one collection that I make it in the Test class which will keeps the elements that I add to the map collection,this exception will be thrown that it is for line 5:a[i] = map.get(new Integer(i));
V[] a = null;
public void sort() {
V temp = null;
for (int i = 0; i < map1.size(); i++) {
a[i] = map1.get(new Integer(i));
if (a[i].getName().hashCode() > a[i + 1].getName().hashCode())
temp = a[i];
a[i] = a[i + 1];
a[i + 1] = temp;
}