Fifteen weeks Study Notes

Today, when you want to write android code data in the empty list, but can not be used again after the clear method found inside add data, and after the query data and found that you can get the same effect by the other two methods:

1, List <> list = new ArrayList <> (); (but this method did not freed on a memory, not recommended)

2, using removeAll method. (I use this)

Guess you like

Origin www.cnblogs.com/yang-qiu/p/11040120.html