Search:

Type: Posts; User: chrisob

Search: Search took 0.36 seconds.

  1. Replies
    7
    Views
    483

    [SOLVED] Re: Simple Increment in a Loop error

    Fixed, I think! :)


    import java.util.Scanner;


    public class rockPaperSci {

    /**
    * @param args
  2. Replies
    7
    Views
    483

    [SOLVED] Re: Simple Increment in a Loop error

    Will do. It'll wait until later when I don't have a 3 year old trying to hang off me! :)

    Shall report back. This won't beat me! :)
  3. Replies
    7
    Views
    483

    [SOLVED] Re: Simple Increment in a Loop error

    Actually, you are right. It's only exiting when both are 3. I thought that it should exit when either of the variables hit 3, whichever one, it doesn't matter.

    My idea was

    Do

    {

    < code >
  4. Replies
    7
    Views
    483

    [SOLVED] Re: Simple Increment in a Loop error

    Yup, it definitely exits. Unless I'm being stupid, I thought that || meant OR so that the loop would continue while totalCompWin is less than 3 OR totalUserWin is less than 3. Once either hits 3, the...
  5. Replies
    7
    Views
    483

    [SOLVED] Simple Increment in a Loop error

    It's probably something stupid, but I just can't see it as the same idea is working in the same code. Basically, it's a Rock, Paper, Scissors games - it ends when either the computer or user gets to...
  6. Replies
    5
    Views
    388

    [SOLVED] Re: For Loop not working correctly.

    And fixed. Removed unnecessary temp variable for swapping high to low and just initialized scoreLow as whatever scoreHigh was and the else if sorted the rest. Thank you very much for the help. That ;...
  7. Replies
    5
    Views
    388

    [SOLVED] Re: For Loop not working correctly.

    Removing the ; fixed the for loop anyways, and it allowing me to enter 5 students (again in the example)

    My if statements are a bit screwy though as it is giving me the highest student, but an...
  8. Replies
    5
    Views
    388

    [SOLVED] Re: For Loop not working correctly.

    True regarding the going for it before the for loop, now that I look for it. The scoreLow is set high as a basic error trap (there can't be a higher entry than 32k or what not as it's an int, and...
  9. Replies
    5
    Views
    388

    [SOLVED] For Loop not working correctly.

    Hey

    This is probably something easy. In fact, it definitely is. Still new to Java so ignore lack of arrays and better ways of doing it, as I'm only 172 pages into a 1300 page college book!!
    ...
  10. Replies
    4
    Views
    422

    Re: Beginner: Error with 'extends JApplet'

    I'm sure it will make more sense to me (classes and importing etc) once I get a bit more practice. Expect to see a lot of me!!!

    Thanks again! This is why I miss doing this in college as it's good...
  11. Replies
    4
    Views
    422

    Re: Beginner: Error with 'extends JApplet'

    Argh! I had done it in a previous example and just used import javax.swing.* rather than import JApplet and JOptionPane!

    Is it better to just use swing.* or awt.* unless you need to call a...
  12. Replies
    4
    Views
    422

    Beginner: Error with 'extends JApplet'

    Hey,

    I have a bit of history with programming about 6 years ago with C++ when I dropped out of college. However, I am resuming my studies but the course has changed to a more Java based one so I...
Results 1 to 12 of 12