You're welcome - I'm glad you've got it figured out.
In some ways having instance variables can be a menace: as you've found they retain a "memory" from call to call. It's probably best to...
Type: Posts; User: pbrockway2
You're welcome - I'm glad you've got it figured out.
In some ways having instance variables can be a menace: as you've found they retain a "memory" from call to call. It's probably best to...
Did you try the three lines I added at the start of main()?
The output I get is:
0 --> 1
1 --> 1
2 --> 2
3 --> 12
What problems? (Describe both the actual and intended behaviour of your program).
-----
It's a good idea to keep to Java coding conventions: start package names, methods and variables with a...