For reference types (those that expand AnyRef), there is no difference in the final result. isInstanceOf, however, is very encouraged because it is more idiomatic (and probably much more effective).
For primitive value types, such as numbers and Boolean, there is a difference:
scala> val x: Any = 5
x: Any = 5
scala> x.isInstanceOf[Int]
res0: Boolean = true
scala> classOf[Int].isInstance(x)
res1: Boolean = false
This is because when using upstreamed , primitive value types are used for Any(or AnyVal). For the JVM, they look like java.lang.Integers, not like Int. isInstanceOfknows about it and will do the right thing.
, classOf[T].isInstance(x), , T. "" , ( isInstanceOf), scala.reflect.ClassTag. ClassTag Class es, , Scala . ( ClassTag, .)