8.10.9.Overloading When Combining Widening and Boxing
class MainClass { static void go(Long x) { System.out.println("Long"); }
public static void main(String [] args) { byte b = 5;
go(b); // must widen then box - illegal
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method go(Long) in the type MainClass is not applicable for the arguments (byte)
at MainClass.main(MainClass.java:6)