This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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.