title: How to add items into a ListView from a List of another class
body: <p>How can I add items from another class to my listview in mainactivity class I really dont know. Any tips will be really valuable. :((((</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  public class MainActivity extends Activity {
  private ListView listOfTweets;
  private ArrayAdapter&lt;String&gt; tweetsAdapter;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      listOfTweets = (ListView) findViewById(R.id.simple_list_item_1);
      listOfTweets.setAdapter(tweetsAdapter);
      TweetUtil tu = new TweetUtil();
     //How to get list of tweets from TweetUtil here and add it in my listView here ?? ://
  
  }
  }
  </code></pre>
  
  <p>This is the TweetUtil class.</p>
  
  <pre><code>public class TweetUtil{
      public List&lt;String&gt; getTodaysTweets(){
          List&lt;String&gt; tweets = new ArrayList&lt;String&gt;();
  
          tweets.add("Good Morning!");
          tweets.add("How are you??");
          return tweets;
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/BweJa.png" alt="enter image description here"></p>