While working my way through Cay S. Horstmann's "Scala for the Impatient", I noticed something interesting revealed by the first exercise in the first chapter.
- In the Scala REPL, type 3. followed by the Tab key. What methods can be applied?
When I do this, I get the following
scala> 3. % & * + - / > >= >> >>> ^ asInstanceOf isInstanceOf toByte toChar toDouble toFloat toInt toLong toShort toString unary_+ unary_- unary_~ |
But I noticed that if I hit Tab a second time, I get a slightly different list.
scala> 3. != ## % & * + - / >= >> >>> ^ asInstanceOf equals getClass hashCode isInstanceOf toByte toChar toDouble toFloat toInt toLong toShort toString unary_+ unary_- unary_~ |
What is the REPL trying to tell me here? Is there something special about the different methods that appear the second time?