【发布时间】:2015-06-18 10:37:30
【问题描述】:
可以将已声明为final 的int 类型变量分配给字节数据类型变量吗?为什么?
public class ByteDataType {
public int x=20;
byte a=x; //This is an error
public final int z=30;
byte c=z; // This is not an Error !! Why???
}
【问题讨论】: