Reputation: 1
Hey guys! I'm new to Java, and I want to make a new class called Student. Now I want every student to have their own grade array. My question is: how do I make a method setGradeArray in the class Student? Thanks a lot!
Upvotes: 0
Views: 4612
Reputation: 1038800
public class Student
{
private int[] gradeArray;
public void setGradeArray(int[] value)
{
this.gradeArray = value;
}
}
Upvotes: 2