Search:

Type: Posts; User: GregBrannon

Search: Search took 0.12 seconds.

  1. [SOLVED] Re: Scanner cannot be used as variable in "if" Statements???

    You're welcome.
  2. [SOLVED] Re: Scanner cannot be used as variable in "if" Statements???

    Assign what is collected by the Scanner object to a variable and then compare that. Something like:

    double userAnswer = serena.nextDouble();
    if ( userAnswer == answer ) . . . etc.
  3. [SOLVED] Re: Scanner cannot be used as variable in "if" Statements???

    Please post your code correctly.

    '=' is an assignment operator. '==' is a comparison operator.
Results 1 to 3 of 3