This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Stephon231
wrote ...
2012/9/13
Changing the lvls
1
2
3
Stephon231
2012/9/14
#
how would i make it static
danpost
2012/9/14
#
Change 'public int leavesEaten = 0;' to 'public static int leavesEaten = 0;'.
davmac
2012/9/14
#
Just be aware that if you use a static field the value will not be automatically reset when you click the "Reset" button.
Stephon231
2012/9/14
#
how could i ma,e it s that it reset
davmac
2012/9/14
#
You could make it non-static, or you could reset it manually at an appropriate point.
You need to login to post a reply.
1
2
3
X