Fastest way to recreate the ArrayList in a for loop

前端 未结 4 709
野性不改
野性不改 2020-11-29 13:24

In Java, using the following function for a huge matrix X to print its column-distinct elements:

// create the list of distinct values
List va         


        
4条回答
  •  抹茶落季
    2020-11-29 14:02

    You should use .clear() methods , using this you haven't need to assign memory your variable again and again.

提交回复
热议问题