gkeown
2008-12-05 11:11:16 UTC
-------------------------------------------------------------
public class Marks {
public static int enterMarks()
{
int[] classMarks = new int[10];
for(int i=0; i
classMarks[i] = getScannerInput.anInt("Enter the student's marks (out of a possible 20): ");
}
System.out.println("The class exam marks are: ");
for(int j=0; j
System.out.print(classMarks[j] + ", ");
}
return classMarks;
}
public static void main(String[] args)
{
int[] marks = enterMarks();
}
}
-----------------------------------
By the way, getScannerInput is just a program to simplify the basic operations of JOptionPane for first years of programming, so don't be confused about its existence in the code.
So, help please?
Thanks.