I have the following code...
String t = \" \"; for(int l=0; l<=5; l++){ t = \"Num: \" + l + \"\\n\"; } VarPrueba.setText(t);
I am want
Change as follow:
t+="Num: " + l + "\n";
And the most effective way to do this is to using StringBuilder, Something like:
StringBuilder
StringBuilder t = new StringBuilder(); for(int l=0; l<=5; l++){ t.append("Num:"); t.append(l+"\n"); } VarPrueba.setText(t.toString());