I've got two arrays. One that you input words into, and one that changes from Yes to No. When you put the word into the array using an input string, it automatically assigns its counterpart in the second array to No.
You can then change No to Yes but inputting "Word + Yes". And it should print this out into the terminal. However, it is only working for one of the words. I'm testing with two currently.
I'm using i to point to an element in the array.
The way my code is set out is that there are For Loops nested within each other. I can tell that part of it is working as it works successfully for the first item but I'm not sure why only the first item is being affected but the rest won't change. I'm hoping I could get some help:
This is my code
for (i=0; i<arrayWord.length; i++) { if inputString.Contains(arrayWord[i] + "yes") { arrayYesNo[i] = "Yes" } for (i=0; i<arrayWord.length; i++) { system.out.println(arrayWord[i] + arrayYesNo[I]); } } // Close Second For Loop } // Close First For Loop