Angela Li wrote:I also tried this but it also didn't work...
Try this instead:
Lessons:
1. Methods, in order to be useful, generally
return something, so don't use
void unless you know it's correct (eg, for a 'setter' method, or for
main() itself).
2. Resist the urge to make everything
static.
3. Make instance fields
private unless you have a good reason not to.
4. It may be a bit early yet, but try to get into the habit of writing
classes, not
main() methods.
5. Read what the others have already told you about 'pass by value'.
HIH
Winston