title: How can I pass the stringbuilder and display out in another class
body: <p>I'm able to retrieve contact list for my contact picker, now how can I pass the stringbuilder and display out in another class. I thought of using intent but it didn't work.
  Please help. </p>
  
  <pre><code> @Override
          public void onClick(View v) {
              StringBuilder checkedcontacts= new StringBuilder();
              System.out.println("............"+ma.mCheckStates.size());
              for(int i = 0; i &lt; name1.size(); i++)
                  {
                  if(ma.mCheckStates.get(i)==true)
                  {
                       checkedcontacts.append(name1.get(i).toString());
                       checkedcontacts.append("\n");
                  }
                  else
                  {
                      System.out.println("..Not Checked......"+name1.get(i).toString());
                  }
  
              }
  
            finish();
  
            Intent i = new Intent (this,SecondActivity.class);
           i.putExtra("str",checkedcontacts);
           startActivity(i);
  
  
          }       
      });
  }
  </code></pre>
  
  <p>Error: </p>
  
  <pre><code>Intent i = new Intent (this,SecondActivity.class);
               i.putExtra("str",checkedcontacts);
               startActivity(i);
  </code></pre>