I'm working on a code to calculate a final score.
Here below is my code:
public void calcFinalOCAS()
{
int calcFinalOCAS;
int sum = 0;
List<Integer> tmaMarks = new ArrayList<Integer>();
Collections.sort(tmaMarks);
int minMarks = Collections.min(tmaMarks);
if(minMarks < substitutionScore)
{
minMarks = substitutionScore;
}
for (int i = 0; i < tmaMarks.size(); i = i+1)
{
sum = sum + tmaMarks.get(i);
calcFinalOCAS = (sum)/4;
}
}
When I run it I get a semantic error: Exception: java.util.NoSuchElementException
Can someone would help me to know what that error means?:)