This content has been marked as final. Show 1 reply
please read the documentation of Object.getClass() and the JLS. The method is special in that it returns "Class<? extends |X|> where |X| is the erasure of the static type of the expression on which getClass is called". The erasure of T (where T is a type variable with the implicit upper bound Object) is Object. Thus the return type of x.getClass() is Class<? extends Object>.
With kind regards