Campbell Ritchie wrote:Welcome to the Ranch
What you are doing is setting an element in a List (why the + 1?), then printing nextWord. Now, if nextWord is a String, then it cannot change. Rather than printing nextWord, print the List and see what happens.
Thanks!
The +1 one is there because the integer I want to replace is the one after the the int index, wich contains() the characters "!", "." and "?". String nextWord = myList.get(i+1). The variable is declared inside the for-loop. So it should work, right??