I have a instance variable(art) of main activity class getting assigned with a value in onPostExecution method.Log statements prints the value of art in onPostExecute method.

But the value of art is null after the onPostExecute method.

```
public class MainActivity extends ActionBarActivity implements OnItemClickListener {
ListView listView1;
String[] dummyData = {"sunday","monday","tuesday","wednesday","thursday","friday","saturday","sunday","monday","tuesday",
        "wednesday","thursday","friday","saturday","sunday","monday","tuesday","wednesday","thursday","friday","saturday"};
ArrayAdapter<String> adapter ;
ArrayList<String> summery = new ArrayList<String>(4);
ArrayList<String> links = new ArrayList<String>(4);
Elements art;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    String stringUrl = "https://techcards.wordpress.com";
    Fetch fetch = new Fetch();
    fetch.execute(stringUrl);

    try{
         for (int i =0;i<art.size() ;i++ ) {

             Log.v("articles after post executive",art.get(i).toString());
             links.add(i,art.get(i).getElementsByTag("a").toString());
             Log.v("links",art.toString());
             summery.add(i,art.get(i).getElementsByTag("p").text());

         }

     }catch(NullPointerException e){
         e.printStackTrace();
         System.out.println("art is null");
     }

    listView1 = (ListView) findViewById(R.id.listView1);
    adapter = new ArrayAdapter<String>(this,R.layout.single_row,R.id.textView2, links);
    listView1.setAdapter(adapter);
    listView1.setOnItemClickListener(this);

}

@Override
public void onItemClick(AdapterView<?> parent, View view, int position,long id) {
    TextView t = (TextView) view.findViewById(R.id.textView2);
    String text =(String) t.getText();
    Toast.makeText(this, text, Toast.LENGTH_SHORT).show();//this makeText is a static method
}

// Fetch AsyncTask
private class Fetch extends AsyncTask<String, Void, Elements> {

    @Override
    protected Elements doInBackground(String... params) {
        Elements articles = null;

        try {
            // Connect to the web site
            Document doc = Jsoup.connect(params[0]).get();
            Element main =doc.getElementById("content").getElementById("primary").
                    getElementById("main");

            articles = main.getElementsByClass("entry-summary");

        } catch (IOException e) {
            e.printStackTrace();
            System.out.println("IO exception");
        }

        return articles;
    }

    protected void onPostExecute(Elements result) {

        art = result;
        for (int i =0;i<art.size() ;i++ ) {
            Log.v("links in post executive",art.get(i).getElementsByTag("a").toString());
            Log.v("summery in post executive",art.get(i).getElementsByTag("p").text());
        }
    }

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == R.id.action_settings) {
        return true;
    }
    return super.onOptionsItemSelected(item);
}

```

}

art is giving null pointer exception when i'm trying to use it to update links and summery.