title: how to set data in ListView using List<Object> in android
body: <p>I have added some dummy data to ListView as </p>
  
  <pre><code>List&lt;String&gt; sevenDay;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_main, container, false);
          String[] forecastList = {
                  "Today",
                  "Tomorrow",
                  "The day after Tomorrow"
          };
          sevenDay = new ArrayList&lt;&gt;(Arrays.asList(forecastList));
  
          ArrayAdapter&lt;String&gt; forecasteAdapter;
          forecasteAdapter = new ArrayAdapter&lt;String&gt;(
                  getActivity(),
                  R.layout.list_item_forecast,
                  R.id.list_item_forecast_textView,
                  sevenDay);
  
          ListView forecasteListView = (ListView) rootView.findViewById(R.id.listView_forecast);
          forecasteListView.setAdapter(forecasteAdapter);
          new FetchWeatherTask().execute("SomeThing",null,null);
          return rootView ;
      }
  </code></pre>
  
  <p>FetchWeatherTask is given below as  </p>
  
  <pre><code>public class FetchWeatherTask extends AsyncTask&lt;String, Void, ForecastWeather&gt;{
          private final String LOG_TAG = FetchWeatherTask.class.getSimpleName();
  
          @Override
          protected ForecastWeather doInBackground(String... params) {
              try{
                  ForecastWeather forecastWeather = Util.newInstance().getForcastWeatherByCityName(params[0]);
                  Log.i(LOG_TAG, "Got City name " + forecastWeather.getCity().getName());
                  return forecastWeather;
              } catch (Exception e){
                  Log.e(LOG_TAG, "Exception " + e.getMessage());
                  e.printStackTrace();
              }
              return null;
          }
  }
  </code></pre>
  
  <p>getForcastWeatherByCityName(params[0]) returns a object of </p>
  
  <pre><code>public class ForecastWeather {
  
      private String cod;
      private String message;
      private Integer cnt;
      private City city;
      private java.util.List&lt;SomeObject&gt; list = new ArrayList&lt;SomeObject&gt;();
      // omitting setters/getters 
  }
  </code></pre>
  
  <p>now in <code>onPostExecute()</code> I have to update the <code>sevenDay</code> variable as</p>
  
  <pre><code>@Override
  protected void onPostExecute(ForecastWeather forecastWeather) {
     super.onPostExecute(forecastWeather);
     sevenDay = forecastWeather.getList(); // Here 
  }
  </code></pre>
  
  <p>Here I need to get values from java.util.List list of ForecastWeather, but don't have Idea how to convert that object to string?</p>