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 trial

Java Java Objects Harnessing the Power of Objects Filling the Dispenser

Need help with "actual and formal arguments lists differ in length".

I am getting an error when I try to run my Workplace. I have tried googling this and I can't figure out where I have went wrong. I keep getting "actual and formal arguments lists differ in length".Any help would be greatly appreciated! Thank you!

https://w.trhou.se/z672nxihds

1 Answer

You wrote "println" instead of "printf". Your code should be like the following:

System.out.printf("Fun Fact! There are %d PEZ allowed in every dispenser.%n", PezDispenser.MAX_PEZ);