Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    13
    Views
    2,724

    Re: BMI Calculator, (boolean problem)

    The code uses 3 while() statements where an if/else if is more appropriate. Use a while() statement for looping.
    When you learn the switch statement you'll see it's better for where the while...
  2. Replies
    13
    Views
    2,724

    Re: BMI Calculator, (boolean problem)

    @QFox Please read this: http://www.javaprogrammingforums.com/cafe/9544-problem-spoon-feeding.html
  3. Replies
    13
    Views
    2,724

    Re: BMI Calculator, (boolean problem)

    When you get errors, you need to post the full text of the error and the source that caused it.
  4. Replies
    13
    Views
    2,724

    Re: BMI Calculator, (boolean problem)

    = is the assignment operator
    == is the compare for equality operator

    It is more common to code tests of the values of boolean variables without comparing them:


    boolean aBooleanVar = false;
    ...
Results 1 to 4 of 4