how to get the output of a string in setText?
<p>here is my code...</p>

<pre><code>package sortarray.com;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class SortArray extends Activity {
    ArrayList&lt;String[]&gt; matchedFruits = new ArrayList&lt;String[]&gt;();
TextView selection;
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    String fruits[] = new String[7];//Sorted array
    fruits[0] = "apple";
    fruits[1] = "capricot";
    fruits[2] = "banana";
    fruits[3] = "mango";
    fruits[4] = "melon";
    fruits[5] = "pineapple";
    fruits[6] = "peach";
    char currChar=fruits[0].charAt(0);//Get first char of first element

    boolean match=false;
    int len=fruits.length;
    List&lt;String&gt; tmp = new ArrayList&lt;String&gt;();

    for(int i=1;i&lt;len;i++)
    {
    Log.d("Comparing ", fruits[i].charAt(0)+","+currChar);
    if (fruits[i].charAt(0)==currChar)
    {
    if (match==false)//new match?
    {
    match=true;//Reset search
    tmp.clear();//clear existing items
    tmp.add(fruits[i-1]);
    Log.d("Started new list ", fruits[i-1]);
    }
    else
    {
    tmp.add(fruits[i-1]);
    Log.d("Added to list ", fruits[i-1]);
    }
    }
    else
    {
    match=false;
    tmp.add(fruits[i-1]);
    matchedFruits.add(tmp.toArray(new String[tmp.size()]));//add to final list
    Log.d("Finished a list ", fruits[i-1]);
    tmp.clear();//clear existing items

    }
    currChar=fruits[i].charAt(0);


    }
    tmp.add(fruits[len-1]);
    matchedFruits.add(tmp.toArray(new String[tmp.size()]));//add left over items
    printList();
    }

    void printList()
    {
    //Print the list 
    for(int i=0;i&lt;matchedFruits.size();i++)
    {
    String tmp2[]= matchedFruits.get(i);
    for (int j=0;j&lt;tmp2.length;j++)
    {
     //Log.d("Final list", "Array #"+i+"["+j+"],"+tmp2[j]);
        **//selection.setText(tmp2[j].toString());**
    }
    }
    }

    }
</code></pre>

<p>i want to print the output of string 
using the selection.setText(); // selection.setText(tmp2[j].toString());**
but not able to do so....</p>

<p>plz help me..</p>
