-
Help with algorithm
I am being told that "class" or "interface" expected for lines 8,11,42,42. i have no idea why. any help is accepted, here is the code
Code:
public class Marks
{
public static void main(String args[]);
{
int[] marks = enterMarks();
}
}
static int counter=20;
public static int[] enterMarks()
{
int classMarks[]= new int[counter];
for (int i=0; i<counter; i++)
{
classMarks[i] = getScannerInput.anInt("Please enter an integer value between 0 and 20 for each mark :");
}
System.out.println();
System.out.print("The marks entered were ");
for (int j=0; j><counter; j++)
{
System.out.print(classMarks[j]+", ");
}
return classMarks;
}
public static int max(int arr[])
{
int[] marks = classMarks;
int tempStore=0;
for (int k=0;k<counter;k++)
{
if(marks[k]>marks[k+1])
tempStore=marks[k];
}
return tempStore;
}
}
Thanks
-
On line 7 it looks like you have an extra '}' closing off your class. That might be the problem.