constructor with array parameter. Internal array is assigned values as indicated by the parameter. An example of the use of this contructor is:
- int values[] = {2,5,7};
- IntSet a = new IntSet(values); // create a set with elements{2,5,7}


im very very confused on his wording, i dont know if im supposed to creat an array within an array or what he is wanting me to do here. please help me understand this

my guess is..

public IntSet(int values[])
{
     IntSet a = new IntSet(values);
}

Read the problem carefully:

Internal array is assigned values as indicated by the parameter.

You will need a private array, determine its size when the constructor is called and assign the values as stated. Your example does not use an internal array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.