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 trialBryan Morilon
7,492 Pointswait what? What does this mean?
I don't think I understand why I am getting this error message.
Exception in thread "main" java.lang.NoSuchMethodError: PezDispenser.<init>(Ljava/lang/String;)V
at Example.main(Example.java:6)
1 Answer
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsLooks like you have problem in PezDispenser
class.
Could you post it ?
The error says that there is no constructor with one argument, that is Strting
public class PezDispenser {
// system cannot find constructor below
public PezDispenser(String string) {
// some code
}
}
Also since you are clearly using Workspaces. Please Fork a Workspace and share a link here.
That is the fastest and easiest way to find a problem.
If you don't know how to fork a workspace, please watch this very short video that will show you how to do it
Bryan Morilon
7,492 PointsBryan Morilon
7,492 PointsHere is the code I think its referring to;
public class Example {
}