title: How to check whether a function is already called in java?
body: <p>I have called a method twice in my Android Java project but i want to invoke it only once. When I am calling the method for a second time, I want to check whether the method has already been invoked or not. Code is something like this:</p>
  
  <pre><code>class SomeClass {
      //called with certain condition
      private void a(){
           c(); //first call
      }
  
      private void b() {
           c(); //second call,check here whether function is invoked already or not,if invoked not invoke here or vice-versa
      }
  
      //called with certain condition
      private void c() {
  
      }
  }
  </code></pre>