HELP WITH getClass() method

Consider this class:

public class MyClass {...}


what is the difference between using getClass() and using MyClass.class,

I heard somewhere that getClass() can cause unexpected behaviour when a class extends MyClass but why would that happen ?
Was this page helpful?
HELP WITH getClass() method - Java Community | Help. Code. Learn.