Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    25
    Views
    3,639

    Re: Error in IF-Else Code

    The == operator tests if the two references point/refer to the same object.
    It is possible for there to be two Strings (ie two different objects) with the same contents. The equals method would say...
  2. Replies
    25
    Views
    3,639

    Re: Error in IF-Else Code

    Instead of assuming, you could test if A was "F" and if not, print out an error message.
  3. Replies
    25
    Views
    3,639

    Re: Error in IF-Else Code

    Ask google or wikipedia.
  4. Replies
    25
    Views
    3,639

    Re: Error in IF-Else Code

    It's not a bug. Its a syntax error.
  5. Replies
    25
    Views
    3,639

    Re: Error in IF-Else Code

    Which statement is at line 17?
    The compiler is saying that the statement on line 17 needs and ending ;


    You need to understand how to read the API doc that describes how to use a class's...
  6. Replies
    25
    Views
    3,639

    Re: Error in IF-Else Code

    This is an assignment (=) statement not an equality(==) test.
    However, You should use the equals() method to compare Strings. The == operator is for primitives.

    Copy and post here the full text...
  7. Replies
    25
    Views
    3,639

    Re: Error in IF-Else Code

    This is an assignment (=) statement not an equality(==) test.
    However, You should use the equals() method to compare Strings. The == operator is for primitives.
Results 1 to 7 of 7