Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEmmanuel Ezejiofo
Android Development Techdegree Student 6,808 PointsI am confused on when to use the static keyword
I do not understand when to use the static keyword and when not to use the static keyword
1 Answer
Jazz Jones
8,535 PointsThe "static" keyword is used to access a method or field within the class without creating an instance of it. Basically so you don't have to declare MAX_PEZ over and over again each time you need to access it's information