You don't know how to use List

xiaoxiao2021-03-06  197

In the data container provided in Java, I am afraid that there is no more commonly used than List. In addition to the general add, LST is still very useful in GET

Merge two LSTs. Two LSTs often need to be combined in programming. I used to use the stupid method LST1 = new aarraylist (); for (int i = 0; lst2.size (); i ) {lst.add (lst2.get (i));} I didn't expect to use Addall (Collection c) Method This is to merge two LSTs to be lst1.addall (LST2); default to plug in all objects in LST2 to the end addall (INT INDEX, Collection C) inserted into the specified location.

转载请注明原文地址:https://www.9cbs.com/read-128855.html

New Post(0)