Welcome to the Treehouse Community
Looking to learn something new?
Mohammed Khalil Ait Brahim9,539 Points
I can see that you wrote printLn instead of println (all lowercase)
Charlene Allfrey5,865 Points
You can't call a class from another file unless the file name is the same as the class name. So your code is trying to call the PezDispenser class like in the example but you named your class file PezD.java. You either have to update your code to match the new file/class name or you need to correct the files and recompile to get it to work. Hope that makes sense :-)
i had almost the exact code problem, and thought that I had Craigs code word for word. As usual when I think I have it word for word its usually a very small typo. Thanks for reminding me to check my spelling.
From the image you provided I can see two errors .one is as poited out printLn -> should be println the other one is the name for the class PezDispenser .he is using PezDispenser because the class he created in side PezDispenser.java is named PezDispenser. and one thing you should know is that if the class name is PezDispenser the file name should also be PezDispenser.java. from the pic I can see that yours is different .therefore you either have to change the name for the class or change the declaration appropriately .