title: Is there a way to tell which child class called a parent's function in java?
body: <p>I have two classes that are extending the same class, for example:</p>
  <pre><code>abstract class A {
  //functions
  }
  class B extends A {
  //functions
  }
  class C extends A {
  //functions
  }
  </code></pre>
  <p>I would like a function in the parent class to change it's behavior depending on which child class is calling the function, for example, a function in class A will execute a different if statement depending on which child class calls the function. Is there a way for the parent class to know which child constructor is using it's function?</p>