I was looking at a java code and saw the use of
...
and i thought it is a replacement of []
Here is an example using ...
:
public StudentData(String firstName,String lastName,double ... list)
{
// initialise instance variables
this.firstName = firstName;
this.lastName = lastName;
this.testScores = testScores;
this.grade = grade;
grade = courseGrade(list); //calc
}
Here is an example without it:
public StudentData(String firstName,String lastName,double [] list)
{
// initialise instance variables
this.firstName = firstName;
this.lastName = lastName;
this.testScores = testScores;
this.grade = grade;
grade = courseGrade(list); //calc
}
I tried using it in my code and it solved a few of my error messages that were previously lingering. Can you explain what the functionality of ...
is vs. []