Search:

Type: Posts; User: Deaththekid

Search: Search took 0.09 seconds.

  1. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Also what sort of error would trigger this catch statement?
    catch (IOException ioe) {
    System.out.println("You suck");
    }

    Java required that I have an input output exception like this...
  2. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Err, to amend that statement... well. How exactly does the buffreader work?
  3. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Ok so once I create the buffreader I only need to reference it via string inside of the loop?
  4. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Here is the more refined version based on your reccomendations Norm. They let me remove a few lines of code.

    Thanks for all the help!

    On to the next challenge.




    import...
  5. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Thanks for the tips. I will play with those to see if I can get my program working that way as well. Also, I found that I did still have an error. The catch (method?) whatever the term for that is...
  6. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Hah I can't believe it was that simple. Thanks Norm! I fixed it. I did give you the full error message that eclipse gave me. That's all it said when I clicked on the little error icon.

    Here is...
  7. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Thanks for the tip. I finally got past the compiler. Now I can run the program, but when it runs it says program terminated. Also, there is an error on line 11 of my code. It gets past the...
  8. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Yes. That's how I got the error message.
  9. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    I re-wrote my code but now I have a new error.

    Exception in thread "main" java.lang.NoSuchMethodError: main


    Here is my new code. Hopefully it will be easier to read:



    import java.io.*;
  10. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Here is the latest version of my code.



    import java.io.*;
    public class pickanumber {


    int x = (int) ((Math.random()*10)+1)
    while [boolean rightguess1 = false];
  11. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    I will re-post next time. I did post the errors. They were:

    The errors the program is giving me are all in the underlined line. They are:
    -Syntax error on token 'while' delete this token....
  12. [SOLVED] Re: I am a java newb and I am having a problem with my while loops.

    Well, I did just figure out that if I remove the word boolean from the code inside of the while loop it connects the boolean at the top of the while loop to the booleans inside of the loop. The...
  13. [SOLVED] I am a java newb and I am having a problem with my while loops.

    I have been teaching myself java for fun. I found a site that gives assignments so I have been trying to teach myself by completing the programs assigned by the site. This assignment asked that I...
Results 1 to 13 of 13