title: Force the execution of a method in a class
body: <p>I'm using Java and I want to call the method f2 in class A from the class B. Is it possible to do this?</p>
  
  <pre><code>public class A{
    private B b = new B();
  
    public void f1(){
      b.f3();
    }
  
    public void f2(){
      // do something;
    }
  }
  
  public class B{
    public void f3(){
      // Call f2 of class A from here.
    }
  
  }
  </code></pre>