OnJava8-Examples/initialization/OverloadingVarargs3.java
2015-04-20 15:36:01 -07:00

18 lines
358 B
Java

//: initialization/OverloadingVarargs3.java
public class OverloadingVarargs3 {
static void f(float i, Character... args) {
System.out.println("first");
}
static void f(char c, Character... args) {
System.out.println("second");
}
public static void main(String[] args) {
f(1, 'a');
f('a', 'b');
}
} /* Output:
first
second
*///:~