import java.util.Scanner;
public class ClassList {
static final int SIZE = 10;
public static void main(String Args[]) {
Student[] students = new Student[SIZE];
Scanner s = new Scanner(System.in);
String name, id;
float gpa;
do {
System.out.println("Enter a Student");
name = s.nextLine();
System.out.println("Enter a ID");
id = s.nextLine();
System.out.println("Enter a GPA");
gpa = s.nextFloat();
} while(!name.equals("quit"));
}
}
basically, what happened when you run this program is that it will run one fine, then on the 2nd iteration, it will ask for a student name. but it will just skip over where the user should input it and go onto "get ID". How do i stop that.