Have you seen whether its equals() method is overridden or inherited from Object?
The java.lang.Class does not overwrite equals-method.
So this
o.getClass() == f.getClass()
is correct.
I was a little confused, as
this
and this
both returned true.
So I better to use this:
I do not understand, in which cases this makes sense: