9
當我通過Cay S. Horstmann的「Scala for the Impatient」工作時,我注意到第一章中第一個練習揭示了一些有趣的內容。什麼是Scala REPL的標籤填寫告訴我這裏?
- 在Scala REPL中,鍵入3.然後是Tab鍵。可以應用哪些方法?
當我這樣做,我得到以下
scala> 3. % & * + - / > >= >> >>> ^ asInstanceOf isInstanceOf toByte toChar toDouble toFloat toInt toLong toShort toString unary_+ unary_- unary_~ |
但我注意到,如果我按一下Tab鍵第二次,我得到一個稍微不同的列表。
scala> 3. != ## % & * + - / >= >> >>> ^ asInstanceOf equals getClass hashCode isInstanceOf toByte toChar toDouble toFloat toInt toLong toShort toString unary_+ unary_- unary_~ |
什麼是REPL試圖告訴我這裏?第二次出現的不同方法有什麼特別之處嗎?