0

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!

0

1 Answer 1

2
public class Student { private int[] gradeArray; public void setGradeArray(int[] value) { this.gradeArray = value; } } 
Sign up to request clarification or add additional context in comments.

1 Comment

Big +1 on your solution. Very clean ;)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.