short s1 = 1; s1 = s1 + 1; 有错吗?short s1 = 1; s1 += 1 有错吗?

前者不正确,后者正确。如图所示

 

对于 short s1 = 1; s1 = s1 + 1;由于 1 是 int 类型,因此 s1+1 运算结果也是 int 型, 需要强制转换类型才能赋值给 short 型。

而 short s1 = 1; s1 += 1;可以正确编译,因为 s1+= 1;相当于 s1 = (short)(s1 + 1);其中有隐含的强制类型转换。

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
著名培训机构的LTE培训教材。 深入浅出,从基本概念到深入描述。是一份比较全面的教材。全文367页。有料有内容。是一份难得的教材。 文件比较大,所以拆成3部分。这是part1 LTE from A-Z Technology and Concepts of the 4G 3GPP Standard Table of Content Principles and Motivation of LTE............................................1 1.1 Mobile Radio: Comparison between 3G and 4G..................2 1.1.1 Performance and Mobility Management related Issues..............2 1.1.2 Architecture related Issues..........................................................4 1.1.3 Procedure and Radio related Issues...........................................6 1.2 Requirements on LTE............................................................8 1.2.1 General Requirements................................................................8 1.2.1.1 Support of Enhanced Quadruple Play Services............................10 1.2.1.2 Very High Data Rates @ flexible bandwidth deployment ((1.25) 5 – 20 MHz).....................................................................................................10 1.2.1.3 AIPN and PS services only............................................................10 1.2.2 Important Characteristics of LTE Physical Layer.......................12 1.2.2.1 General Physical Layer Characteristics.........................................12 1.2.2.1.1 OFDM ..................................................................................12 1.2.2.1.2 Scalable Bandwidth..............................................................13 1.2.2.1.3 Smart Antenna Technology..................................................14 1.2.2.1.4 Fast scheduling and AMC.....................................................14 1.2.2.1.5 No Soft(er) handover............................................................14 1.2.3.2 OFDM/OFDMA..............................................................................16 1.2.3.2.1 Traditional narrowband communication................................16 1.2.3.2.2 Problems for wideband signals.............................................1

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值