I have this class constructor:
public Category(int max){
...
}
The thing is, I want to make an array of this class, how do I initialize it?
private Category categories = new Category(max)[4];
Does not work.
UPDATE
Do I need to do something like this?
private Category[] categories = new Category[4];
And then initialize each object?
When you are making an array , you are creating an array of Category. That s an instance of array.
When you are populating the array with Category objects, at that point you use the Category with Const.