how do i get the 1st, 1st&2nd and 1st,2nd &3rd characters from a string?
<p>I have a string of numbers and I want to print the first, first and second, first,second and third characters from it. How do I approach this?</p>

<p>This code does not seem to be displaying it in my textview as the application just closes when run. </p>

<pre><code>private char GetCharacters(String phoneNumber) {
    // TODO Auto-generated method stub
    int i=0;
    for (i=0;i&lt;=phoneNumber.length();i++){

        data=phoneNumber.charAt(i);
    }
    return data;
}
</code></pre>
