Brief description: ArrayList Remove method, if the parameter of remove () is int type, then regardless of the type of ArrayList is any type, is to remove the corresponding subscript object. I. Type is non-integer
arraylist<long> Non_intarr = new arraylist<> ();
Non_intarray.add (1L);
Non_intarray.add (2L);
Non_intarray.add (3L);
Non_intarray.add (4L);
System.out.println (Non_intarray.remove (1));
The result is: 2 (a long type) (an object with a value of 2 removed). two. Type is an integer type
list<integer> intarray = new arraylist<> ();
Intarray.add (1);
Intarray.add (2);
Intarray.add (3);
Intarray.add (4);
System.out.println (Intarray.remove (1));
The result is also: 2 (int type) (an object with a value of 2 removed). three. How do I remove an object in the type integer?
list<integer> intarray = new arraylist<> ();
Intarray.add (1);
Intarray.add (2);
Intarray.add (3);
Intarray.add (4);
System.out.println (Intarray.remove (Object) 1);
Can. (because: the ArrayList class of the Remove method implementation is to use the object to deal with)