Quantcast
Channel: User blacktide - Stack Overflow
Viewing all articles
Browse latest Browse all 49

Answer by blacktide for Java - Cannot get loop to recognize newly generated array values

$
0
0

As your code currently stands, you're only parsing the user's input the first time. Inside the loop you're reading the user's input again, but you're not updating the words variable based on the new input.

You should move this line inside your loop:

String words[] = response.split(" ");

Viewing all articles
Browse latest Browse all 49

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>