How many parameters does the varargs tool allow in Java?

I'd like to know how many parameters can be passed using the varargs tool in Java

Is there a JVM or memory limit? As far as I know, varargs is implemented as an array, so the limit is determined by the amount of memory Is it correct?

Solution

Right here. Attempt to allocate memory larger than pergemn memory, throw OUTOFMEMORY

Note that there are no properties for arrays or variables You can freely use memory below the allocated memory

I hope this is just for learning, not using those in your application

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>