西西河

主题:【原创】Java 1.5新特点的一些体验 -- 老兵帅客

共:💬14 新:
全看分页树展 · 主题 跟帖
家园 我们是否应该使用这个Feature呢?Sun的观点是:

So when should you use varargs? As a client, you should take advantage of them whenever the API offers them. Important uses in core APIs include reflection, message formatting, and the new printf facility. As an API designer, you should use them sparingly, only when the benefit is truly compelling. Generally speaking, you should not overload a varargs method, or it will be difficult for programmers to figure out which overloading gets called.

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河