title: How to call a non-static method from one Activity to another activity
body: <p>I have two activities &amp;  i want to call a method clear from B. 
  I tried like this and I am getting null pointer exceptions. </p>
  
  <pre><code>class A extends Activity {
      ...
      public void clear(){}
  
  }
  
  class B extends Activity{
      public void clearData() {
          A a=new A();
          a.clear();
      }        
  }
  </code></pre>