Java和C++在细节上的差异(一) (三)

2014-11-24 03:03:11 · 作者: · 浏览: 4
g.Integer.
15 The value is 2. The class name is java.lang.Integer.
16 The value is 3. The class name is java.lang.Integer.
17 The value is 4. The class name is java.lang.Integer.
18 The value is 5. The class name is java.lang.Integer.
19 The value is 6. The class name is java.lang.Integer.
20 The value is 7. The class name is java.lang.Integer.
21 The value is 8. The class name is java.lang.Integer.
22 The value is 9. The class name is java.lang.Integer.
23 */
  4. Java函数的变参表示方式:
  PrintStream printf(String fmt,Object...args),其效果相当于 PrintStream printf(String fmt,Object[] args)。在C++中变参的表示方式为int printf(const char* fmt, ...); 其后的缺省参数需要通过C语言中提供的宏VA_LIST来协助完成

作者:Stephen_Liu