Hello,
From the following class, when i assign "4" into short it's accepting the value. but if i pass to some method it's gives compilation error.
becuase same value become int type.pls explain to me why.
Thanks, Raghu.K
class
Test {
static void Short(short a){
System.out.println(" short a "+ a);
}
public static void main(
String args[])
{
short s = 4;
System.out.println(" short s "+ s);
Short(4);
}
}