int arraySize = myArray.size(); for(int i = 0; i < arraySize; i++) { myTextView.append(myArray[i]); }
if you want to print one by one use \ n
myTextView.append(myArray[i]); myTextView.append("\n");
PS: Who will suggest changing .size () to .length (), thanks for the suggestion.
FYI, the Questioner mentioned the variable name array.size() , so the answer also has the same variable name to make the task easier.
if your variable (myArray) is used by Array , use myArray.length() , if it is ArrayList uses myArray.size()
source share