I am trying to get an array to take a variable number of objects as input. I am new to programming so I apologize in advance.
Here is my code:
public class Rating{
double [] Ratings;
int CustomerID;
int Domain;
public Rating (int id, int d, double [] x) {
double [] Ratings = x;
int CustomerID=id;
int Domain=d;
}
}
public class All_user{
double [] All_users;
public All_user(Rating...argument) {
double [] All_users={Rating...argument};
}
}
However, I am get this error associated with double[] All_users={Rating..arguments);:
Multiple markers at this line
- Syntax error on token "...", . expected
- arguments cannot be resolved or is
not a field
Any thoughts? Thanks in advance!