I got a doubt and want to know which class method might have been used by JRE for removing objects in below code. Because remove is having two signatures remove(int) and remove(Object). As a part of AutoBoxing feature, here int will be considered as Integer while adding it to Collection. In this scenario which remove method will receive higher precedence and why? Please share the reasons....
Vector v=new Vector();
for(int i=0;i<10;i++)
{
v.add(i);
}
v.remove(5);
System.err.println(v);
Regards Sudhakar Chavali