You should be able to answer that question. Why is is static?
--- Update ---
Ahhh!
You have 2 variables:
totalsold which I assume is for all stands then that does need to be static....
Type: Posts; User: Junky
You should be able to answer that question. Why is is static?
--- Update ---
Ahhh!
You have 2 variables:
totalsold which I assume is for all stands then that does need to be static....
If you were blindfolded and it was your job to count how many hotdogs I sold and I called out "justSold" every time I sold a hotdog how would you keep track? Would you require me to give your a...
public int justSold(int sold) {
return sold++; }
You are increasing the parameter value and not the instance variable that tracks how many hotdogs have been sold. Other problems:
Why are you...