class Main {

  public static volatile Callee callee;

  static class Callee {
    public void call() { System.out.println("Method called"); }

    public Callee() {
      Main.callee = this;
      try {Thread.sleep(1000);} catch (Exception e) {}
      System.out.println("I am constructed!");
    }
  }

  static class Creator implements Runnable {
    public void run() { Main.callee = new Callee(); }
  }

  static class Caller implements Runnable {
    public void run() {
      while (Main.callee == null);
      Main.callee.call();
    }
  }

  public static void main(String... args) {
    new Thread(new Creator()).start();
    new Thread(new Caller()).start();
  }
}