title: How to create "if condition" based on method names in java
body: <p>I have 2 methods with names </p>
  
  <pre><code>firstMethod()
  secondMethod()
  </code></pre>
  
  <p>I wanted to have a if condition based on method names.</p>
  
  <p>For example: </p>
  
  <pre><code>if (methodName.contains (firstMethod()))
  {
  
  }
  else
  {
  
  }
  </code></pre>
  
  <p>Is it possible in Java?</p>