The difference between result.add(new ArrayList(tempList)) vs result.add(tempList)

前端 未结 0 1806
后悔当初
后悔当初 2021-01-28 06:57

What is the difference between these two?

result.add(tempList)

result.add(new ArrayList<>(tempList))

I am getting difference outputs.

/         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题