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)).!().

posted on 2019-07-28 10:28  25th_engineer  阅读(160)  评论(0编辑  收藏  举报