Performance of variable argument methods in Java

前端 未结 6 1159
小鲜肉
小鲜肉 2020-12-19 20:42

I have this question about the performance of a method in Java with a variable number of parameters.

Say I have the following 2 alternatives:

public          


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-19 20:52

    Come back when you have profiler output that says this is a problem. Until then, it's premature optimization.

提交回复
热议问题