I'm writing a simple Java code for competitors of some random competition. I am adding variables such as age, category, and scores. If I add integers or Strings, there is no problem, but when wanting to add int array (it works when instantiating it and write into the constructor) as an argument to the class, it does not work and thins about the array as 5 discrete integers. What am I doing wrong?
private int [] danceScores = new int[5]; //instance variable
public Competitor(int CNumber, String cName, String cLevel, String dStyle, int[] cScores){
...;
danceScores = cScores;}
// in Main method
Competitor competitor1= new Competitor(1, "name", "level", "dance", {1,2,3,4,5});