I believe the issue is your for loop condition.
Example: user enters 7
First iteration, 7 % 10 >= 0, maxDigit = 7
Second iteration, 7 % 10 >= 7, maxDigit = 7 (you enter an infinite loop)
Type: Posts; User: asm_int3
I believe the issue is your for loop condition.
Example: user enters 7
First iteration, 7 % 10 >= 0, maxDigit = 7
Second iteration, 7 % 10 >= 7, maxDigit = 7 (you enter an infinite loop)
Did you mean student in the add method?
[code]
public void setStudents(Student student){
students.add((Student) student);
}
[code]