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

I have spent 3 hours and 12 minutes on this 3 minute video and asked who knows how many questions so please help!

I am on the part of java objects that is debugging the problem. I have exactly what is on Craig's screen and I still have an error saying that it is too verbose in this area:

public boolean promptForGuess() {
    Console console = System.console();
    boolean isHit = false;
    boolean isValidGuess = false;
   while (! isValidGuess) {
    String guessAsString = console.readLine("Enter a letter:  ");

     try {
       isHit = mGame.applyGuess(guessAsString);
     isValidGuess = true;
     } catch (IllegalArgumentException iae) {
      console.printf("%s. Please try again.\n", iae.getMessage()); 
     }

   }
    return isHit;

it is basically saying that the "string cannot be converted to char" but if this is true then why does it work for Craig but not me? As a side note, if anyone from treehouse is reading this, I would like you to know that I noticed that many of your customers have my same plight: your videos move way too fast and they don't give enough instructions. Sincerely, an extremely frustrated treehouse user ready to throw her computer into a volcano

4 Answers

Emily,

One thing I noticed from your workspace in your Game.java file is that you have a method called applyguess() when it should be applyGuess().

Does that help?

yes! it worked! thank you so much I can finally move on!

I don't have the expertise to help you with your Java problem. I can do my best, but it's not a topic I've done many lessons on. However, I do have some suggestions about posting on the forums that may help you find the help you require.

I understand that you're frustrated, but I don't think your current method of posting is going to get you the results you want. From the several posts I've found so far, I don't see enough information for someone to be able to help you solve your problem.

These forums are primarily populated by other students who are volunteering their time to help troubleshoot and hold discussions with other users. We want to be able to help you, but often the quality of the question factors into the quality of the answer.

I would discourage creating multiple posts within a short time frame for the same topic. This makes it difficult to consolidate information and potential assistance into one thread.

When asking a question about a particular video, it's helpful to link to the video you're referencing. This will happen automatically if you ask the question from the lesson page.

If you're having trouble with a particular piece of code, it's helpful to highlight the part giving you problems. However, in order to help you troubleshoot we will need all of the code you're referencing.

Generally, the more information you provide, and the more specific you are about the problems you're having, the more likely you are to get helpful responses.

Edit - After some digging, it looks like the original post has a bit more information. I would recommend consolidating your efforts to that post. It looks like Craig has dropped in over there and is willing to help. Good luck!

Hi Emily,

There doesn't seem to be wrong with the code you have provided. It looks like your error may be somewhere else in your code. Could you provide a snapshot of your workspace?

In the top right corner of your workspace there is an option to do so. Afterwards there should be a link which you could post here.

I noticed that you asked me to answer in another version of this question. Let's go ahead and keep all correspondence in this one to make things easier.

https://w.trhou.se/zxgog54pw9 here is my workspace! Can you please help me I can't move forward at all.

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Can you please include your errors when you make posts?

I'm assuming too that it is not in this code, please Snapshot your workspace so we can get things sorted.

Sorry you are feeling so frustrated that you need to throw things. Hope the volcano isn't active. ;)

Craig Dennis
Craig Dennis
Treehouse Teacher

Also...note that I added a comment in your original post, to which you never replied: https://teamtreehouse.com/forum/it-says-my-message-is-not-simplified-enough-and-my-guessasstring-is-not-correct

Not sure why you aren't responding. Do you not see them? I didn't provide an answer, because I needed more info for your question. Once I get that I will do my best to help you solve it.