I'm new to Java and having some problems, sorry if this is an obvious or often answered question, but I've looked at ~10 other errors of this type and couldn't figure out my problem. I'm getting errors in my main on the marked lines, saying that the constructor is undefined. Any help is appreciated.
public class ValueChanger {
private static int myInt1;
private static int myInt2;
private static int myInt3;
private static int myIntSum;
public static void main(String[] args)
{
ValueChanger constructor = new ValueChanger(); //error here
ValueChanger changeValues = new ValueChanger(); //and here
changeValues.changingValues(myInt1, myInt2, myInt3, myIntSum);
}
public ValueChanger(int myInt1, int myInt2, int myInt3, int myIntSum)
{
myInt1 = 1;
myInt2 = 2;
myInt3 = 3;
myIntSum = myInt1 + myInt2 + myInt3;
}
public int changingValues(int myInt1, int myInt2, int myInt3, int myIntSum)
{
myInt1 = myInt2;
myInt2 = myInt3;
myInt3 = myInt1;
myIntSum = myInt1 + myInt2 + myInt3;
return myIntSum;
}
}