This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi, the compilation fails with the following message varArg.java:7: wide_varArg(java.lang.Long...) in varArg cannot be applied to (int,int) wide_varArg(5,5);
wide_varArg method takes Long wrapper type.When you call method like wide_varArg(5,5) it will be boxed to Integer wrapper type and compiler will try to widen it into Long wrapper type here the error will get generated because Wrapper type of one cannot be widen to another wrapper type.