Question: I've got:

```
class ccProfile{
    private String issuer, name, cardnum, expire;
    private Double bal, limit;
    //getters and setters

```

in creditCard.java. In my main activity, I used a switch statement to just set them all from an array I had. Im trying to print them all to a textview, but I can't seem to get them to print on an individual line....

Example of setting data:

```
ccProfile ccObj1 = new ccProfile();
// . . . . . . . . 
case 2:
    ccObj1.setCardnum(data[z]);
    z++;
    break;

```

Here is how I'm printing:

```
tv1.setText(ccObj1.getIssuer() + "\n");
tv1.setText(ccObj1.getName()+"\n");
tv1.setText(ccObj1.getCardnum()+"\n");
tv1.setText(ccObj1.getExpire()+"\n");
sD = Double.toString(ccObj1.getBal());
tv1.setText(sD+"\n");
sD = Double.toString(ccObj1.getLimit());
tv1.setText(sD+"\n");

```

All its doing is printing the last value, what gives?

Answer: 
You're using [setText()](http://developer.android.com/reference/android/widget/TextView.html#setText%28java.lang.CharSequence%29) which sets the new text and replaces any existing text. It overwrittes your text with every call. You are looking for [append()](http://developer.android.com/reference/android/widget/TextView.html#append%28java.lang.CharSequence%29) which appends text.
Each time you call setText () you are erasing what was there before. If you want to set the value of the TextView to all of the strings try using a StringBuilder

```
StringBuilder sb = new StringBuilder();
sb.append("string 1 \n");
sb.append("string 2");
tv1.setText(sb.toString());

```