摘要:
输出: inside mainloading CandyAfter Creating Candyloading GumAfter Class.forname("Gum")loading CookieAfter Creating Cookie static初始化是在类加载时进行的 Class.forn 阅读全文
posted @ 2016-03-21 22:57
zerocoin
阅读(235)
评论(0)
推荐(0)
摘要:
1.s=s+4; 在执行s=s+4;语句时,编译器在编译的时候,默认并没有强制类型转换。所以,s是short类型,4是int类型,s会自动提升为int类型,相加的和也是int类型,赋值给short类型的变量肯定会损失精度。这时候就需要进行强制类型转换:s=(short)(s+4); 阅读全文
posted @ 2016-03-21 22:56
zerocoin
阅读(305)
评论(0)
推荐(0)

浙公网安备 33010602011771号