Java方法中byte []和byte ...之间的区别 [英] Difference between byte[] and byte ... in Java Methods
本文介绍了Java方法中byte []和byte ...之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人问我这两个方法参数之间有什么区别,以及为什么要在特定分配的数组上使用....
Someone asked me what the difference between the two method parameters and why you would use the ... over specifically assigned array.
putMessage(byte ...send)
putMessage(byte[] send)
我无法自信地回答他们,也无法记住...的名字.
I couldn't answer them with confidence and couldn't remember what the ... is called.
推荐答案
第一个与简而言之
A.首先可用于调用单字节类型arg,2字节args ..或许多args或数组.
A. First can be used to call with single byte type arg, 2 byte args.. or many args or an array.
B.秒仅与数组一起使用.
B. second will be used with array only.
这篇关于Java方法中byte []和byte ...之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文