K&B book (pg no 267) ques no :3
class a{
String inv(short s){return "inv";}
String inv(short... s){return "var arg";}
}
class b
{
public static void main(String args[])
{
System.out.println(new a().inv(7)); //compilation fails
}
}
the ans is:compilation fails since there is no explicit cast
during a noraml assignment short s=7; succeeds but y does it fail wen it is passed as an argument