我在下面遇到错误,我很困惑为什么这是一个为学生提供存储点信息的实验室。
import java.util.Arrays;
我的下方括号有问题
public class Student {
private String studentID;
private String studentName;
private String studentMajor;
private double studentGPA;
private String studentGrad;
private long[] ;
下面的学生()问题
public Student(){
studentID = "";
studentName = "";
studentMajor = "";
studentGPA = 0;
studentGrad = "";
}
public Student(String stuID, String stuName, String stuMajor, double stuGPA, String stuGrad) {
studentID = stuID;
studentName = stuName;
studentMajor = stuMajor;
studentGPA = stuGPA;
studentGrad = stuGrad;
}
public void setID(String ID) {
studentID = ID;
}
public void setName(String name) {
studentName = name;
}
public void setMajor(String major) {
studentMajor = major;
}
public void setGPA(double GPA) {
studentGPA = GPA;
}
public void setGrad(String Grad) {
studentGrad = Grad;
}
public String getID() {
return studentID;
}
public String getName() {
return studentName;
}
public String getMajor() {
return studentMajor;
}
public double getGPA() {
return studentGPA;
}
public String getGrad() {
return studentGrad;
}
public void printData() {
System.out.println("Student ID: "+studentID);
System.out.println("Student Name: " +studentName );
System.out.println("Student Major: "+studentMajor);
System.out.println("Student GPA: "+ studentGPA);
System.out.println("Student Year of Graduation: " +studentGrad);
}
}