How to print i and i+1 in for-loop in android? : I have an array full of names. Im using a for-loop to print my names but the problem is that i want to print 2 names: i(the name) and i+1(the next name). you may not get what i said, look at my code:

My code:
=======
"text" is my textview and "people" is the array:

    for (int i=0; i< people.size(); i = i+2) {
    text.append(people.get(i) + " with " + people.get(i+1));
    }
## the problem is it prints this: ##
(these are the names in the array : "Kim","John","Sam","Edison")

Kim with Kim Sam with Sam
### instead of this : ###
Kim with John Sam with Edison

