Dylan Dylan - 3 months ago 8
Java Question

Creating a program with list of users websites and how many .com there are

I was wondering if there is a reference somewhere where I can get help by creating a program that will take the users input of a websites, add it to a list, and when they type 'stop', it will state how many websites have .com at the end. This is for Java using Jcreator. Any information for this would be helpful, thanks.

Answer

Just get rid of the call to String bst = input.next();. That's swallowing your input. The rest of your code seems to work.

Reference: public String next()