So I should declare the array like this

String[] product = new String[100];

Err... I still don't know how to implement the methods.

Could you please tell why I couldn't use the the constructor the way I implemented it.

Product[] product = new Product[100];

because in your constructor you initialize fields which you didn't declare.

Be a part of the DaniWeb community

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