I have made this simple code which adds numbers together and finds the average. I get the error message shown in the title. The code below is; can someone please help me with the error when my tutor couldn't?
public class MathsQuiz {
public MathsQuiz(){
int int1 = 45;
int int2 = 56;
int int3 = 34;
int int4 = 89;
int int5 = 4;
int answer = 0;
}
public int add(int int1, int int2, int int3, int int4, int int5){
int answer = ((int1 + int2 + int3 + int4)/int5);
return answer;
}
public static final void main(String[] str){
System.out.println ("MathsQuiz" + " " + answer);
MathsQuiz mq = new MathsQuiz();
}
}