class arrayList extends ArrayList<missedCall>
{
public boolean add(missedCall m)
{
int i=size();
if(i>10)
remove(0);
super.add(m);
return true;
}
}
When I call the add
method using user-defined class arrayList
11 times first element does not get removed.
Please provide the solution