Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Amulya Arora
6,133 Pointswhat is wrong in this program?
this is the link to my workspace: https://w.trhou.se/le3qqkqk3h
there are 2 files: Example.java , PezDispenser.java
when you complie Example.java it shows 6 errors, so how do I fix them
2 Answers

Carlos Vallejo
11,821 PointsHi Amulya
How its going?
You have an error in the method isEmpty, you have the below sentence
if boolean isEmpty() { return pezCount; }
you have to create it as
public boolean isEmpty(){ boolean empty=false; //put the logic here to validate that is empty return empty; }

Amulya Arora
6,133 PointsThanks a lot! Carlos Vallejo