Programming in Scala第5章Basic Types and Operations总结

本文详细探讨了方法重载的概念,解释了如何通过不同的参数类型来区分相同名称的方法。此外,还深入解析了位运算中的异或操作,展示了其在数据处理中的应用。

  [1] Packages, which were briefly described in Step 1 in Chapter 2, will be covered in depth inChapter 13.
  [2] figuratively speaking
  [3] Overloaded methods have the same name but different argument types. More on method overloading in Section 6.11.
  [4] All is not necessarily lost, however. There is an extremely slight chance your program with the *p might compile as C++.
  [5] The bitwise-xor method performs an exclusive or on its operands. Identical bits yield a 0. Different bits yield a 1. Thus 0011 ^ 0101 yields 0110.
  [6] The leftmost bit in an integer type is the sign bit. If the leftmost bit is 1, the number is negative. If 0, the number is positive.
  [7] The automatic check does not look at the right-hand side, but any reasonable equalsmethod should return false if its argument is null.
  [8] By now you should be able to figure out that given this code, the Scala compiler would invoke (bills.!*&^%~(code)).!().

转载于:https://www.cnblogs.com/25th-engineer/p/11258023.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值