Scala, isInstanceOf, inheritance, getClass, and equals (equality)
By Alvin Alexander. Last updated: August 9 2017
I was doing a little Scala programming this morning, and because I hadn't written any code in a while, I managed to forget how isInstanceOf works with inheritance in Scala.
To refresh my memory, I wrote the following example code: