Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

How can i improve this code?

Hi Everyone

i'm currently working on the Jar Guessing game , and i got it to work ( i would really appreciate it , if someone tests it out and comments what they think i will link my GitHub repo at the bottom of the post ) but i still have a little problem , when the user enters an illegal guess (higher than the maximum number of items in the jar or lower than 1 ) an IllegalArgumentException gets thrown (like i designed it to ) but the program stops prompting the user to guess , and i wasn't able to figure out on my own how to make it continue prompting .If someone can help me i'll really appreciate it . Another side question i have about the project is , what is meant by "encapsulating the I/O in a prompter class " ? I made a Prompter , but i'm not sure if the implementation is really good and if someone has any ideas how i can improve this program in general , i would really love to hear them.

this is the program : https://github.com/Melodie95/Treehouse-Project-1-

Post all techdegree related stuff to Slack ... there you will be likely to get answer