I had a discussion with a coworker today, whether usage of using the Java operator
instanceof is a kind of reflection. And the discussion quickly evolved into what actually defines reflection.
So, what is the definition of reflection?
And is the usage of
instanceof considered "using reflection" ?
And in addition, if
instanceof is considered reflection, then is polymorphism not also "using reflection"? If not, what is the difference?