class Test {

  public void method1()
  {
      newMethod();
  }

  public void method2()
  {
      newMethod();
  }

    private void newMethod() {
        System.out.println(1);
        System.out.println(2);
    }
}