Search:

Type: Posts; User: Norm

Search: Search took 0.08 seconds.

  1. Replies
    8
    Views
    1,351

    [SOLVED] Re: My string is not activating my if statment.

    Wow. I'll be famous.
    Keep plugging along. It'll get easier and make more sense as you get more experience and knowledge.
  2. Replies
    8
    Views
    1,351

    [SOLVED] Re: My string is not activating my if statment.

    Use the equals() method to compare Strings. The == operator is for primitives.

    You could use a String literal in your if statement:
    if(operation.equals("stats"){
  3. Replies
    8
    Views
    1,351

    [SOLVED] Re: My string is not activating my if statment.

    By "going off" I assume you mean that the condition tested should be true.

    The original code tested the contents of operation("stat")
    to the contents of stat(null);
    Those two contents are...
  4. Replies
    8
    Views
    1,351

    [SOLVED] Re: My string is not activating my if statment.

    Try debugging your code by adding a println before the if statement to show the values of the Strings being compared. Something like this:
    System.out.println("op=" +operation + "< stats=" + stats +...
Results 1 to 4 of 4