widening followed by autoboxing
//widening followed by auto boxing is not allowed
//bute ----to---> long ---to---> Long ----> Not allowed
class Sc
{
public static void m1(Long l)
{
System.out.println("Long");
}
public static void main(String a[])
{
byte b=5;
m1(b); //in valid
}
}
0 comments:
Post a Comment