title: how do call another class in android?
body: <p>I have a problem. I do not know how to call a different class. the code is for a button (when you click the button a message appears in random) so i thought it would be better if i placed it in a different class as i have also used arrays.Now i do not know how to call the class.</p>
  
  <p>This is my code.I want to call "Firstin" inside SecondActivity.</p>
  
  <pre><code>public class SecondActivity extends Activity {
  private Firstin mFirst = new Firstin ();
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_second);
          //finds textview
  
          final Text Ftext = (Text) findViewById(R.id.textView2);
          @SuppressWarnings("unused")
          final Text Stext = (Text) findViewById(R.id.textView3);
          //finds button view
          Button btnView = (Button) findViewById(R.id.button1);
          @SuppressWarnings("unused")
          Button btnView2 = (Button) findViewById(R.id.button2);
  
          btnView.setOnClickListener(new View.OnClickListener() {
  
              public void onClick(View v) {
  
  
  
  
  String Answer = mFirst.firstAnswer();
  
                  Ftext.setTextContent(Answer);
              }
          });
  </code></pre>
  
  <p>this is the class I'm trying to call: </p>
  
  <pre><code>package com.example.insultgenerator;
  
  import java.util.Random;
  
  public class Firstin {
  public String firstAnswer(){
      String [] mResults={
              "its cool",
              "we cool",
              "im cool",
              "he cool",
              "she cool"
              };
      // the button was clicked so replace the answer label with answer
      String Answer = "" ;
      // the two double is a 'empty string 
      Random RandomGen = new Random();// telling the program to construct a random generator
      int RandomNum= RandomGen.nextInt(mResults.length);
  
      Answer = mResults[RandomNum];
      return(Answer);
      }
  }
  </code></pre>