Content deleted Content added
m fix link |
Gracenotes (talk | contribs) →Variadic functions in C# and Java: not all versions of java |
||
Line 43:
== Variadic functions in C# and Java ==
Other languages, such as [[C Sharp|C#]] and [[Java (programming language)|Java]] use a different approach
This feature, called "varargs", has been present in Java since [[Java Platform, Standard Edition#Nomenclature, standards and specifications|J2SE 5.0]]. Using [[autoboxing]], this can also be used to pass [[Primitive type|primitive]] arguments to for example a print function, as can be seen in the Java example below: public static void printSpaced(Object... objects) {
|