Wow. I'll be famous.
Keep plugging along. It'll get easier and make more sense as you get more experience and knowledge.
Type: Posts; User: Norm
Wow. I'll be famous.
Keep plugging along. It'll get easier and make more sense as you get more experience and knowledge.
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"){
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...
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 +...