I have multiple classes, and am attempting to call a method in a different class.
This should work, but it gives errors:
TheMethods method = new TheMethods();
Java tells me that the constructor TheMethods() is undefined.
What I am doing wrong?
Edit:
I needed to pass a reference to my main class and initialize it.
In your constructor you have a parameter
MCTag m. If you are going to use this constructor you would need to do it like this:Constructors are like any other method and have to have the correct parameters in order for it to work correctly.
EDIT:
It would look something like this: