JAVA基础问题,趣味细节分析之final

short s1 = 1;
char c1 = 1;
byte b1 = s1;
byte b2 = c1;

这样写会有问题,但是下面这样写就没问题,为什么,谁知道
final short s2 = 1;
final char c2 = 1; 
byte b3= s2;
byte b4 = c2;

有网友说:

首先是,如过你不加FIANAL
...


Tags: 趣味  final  JAVA  
分页:[«] 1[»]
分类最近文章
    <#CACHE_INCLUDE_CATEGORY__HTML#>
Powered By Z-Blog   STYLE by busfly . FatMouse
Copyright © 2007 巴士飞扬技术博客. . 沪ICP备07027972号. 会员群1(J2EE为主):3769186.