2015-04-20 15:36:01 -07:00
|
|
|
|
//: initialization/OverloadingVarargs2.java
|
2015-05-29 14:18:51 -07:00
|
|
|
|
// <20>2015 MindView LLC: see Copyright.txt
|
2015-04-20 15:36:01 -07:00
|
|
|
|
// {CompileTimeError} (Won't compile)
|
|
|
|
|
|
|
|
|
|
public class OverloadingVarargs2 {
|
|
|
|
|
static void f(float i, Character... args) {
|
|
|
|
|
System.out.println("first");
|
|
|
|
|
}
|
|
|
|
|
static void f(Character... args) {
|
|
|
|
|
System.out.print("second");
|
|
|
|
|
}
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
f(1, 'a');
|
|
|
|
|
f('a', 'b');
|
|
|
|
|
}
|
|
|
|
|
} ///:~
|