title: How to call non static method from main class
body: <p>I just ran into this problem while coding android. If I have a non-static method (It has to be non-static for the code inside to work) in my main class, how am i supposed to call it from within another class, because obviously I can't create another instance of my main class without starting a new instance of the program?</p>
  
  <pre><code>public class MainActivity extends FragmentActivity {
  public static String starttime = "";
  public static String startdate = "";
  public static String endtime = "";
  public static String enddate = "";
  public static boolean start = false;
  }
  
  public void setDateText() {
      EditText TextStart = (EditText)findViewById(R.id.txt_start);
      TextStart.setText(startdate + " at " + starttime, TextView.BufferType.NORMAL);
      EditText TextEnd = (EditText)findViewById(R.id.txt_end);
      TextEnd.setText(enddate + " at " + endtime, TextView.BufferType.NORMAL);
  }
  </code></pre>
  
  <p>Any help on how to call the <code>setDateText()</code> method from another class?</p>
  
  <p>Thanks in advance</p>