OnJava8-Examples/housekeeping/OverloadingVarargs2.java

17 lines
373 B
Java
Raw Normal View History

2015-09-07 11:44:36 -06:00
// housekeeping/OverloadingVarargs2.java
2015-06-15 17:47:35 -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');
}
2015-09-07 11:44:36 -06:00
}
/* Output: (None) */