Hello, I am new to Java I was wondering how could I have a

Just a basic sample of code what I want to do is create 5 separate heads with the Multiply class.Code:`for (int i = 0; i < 5; i++) {`

Multiply head[i] = new Multiply(); // This line does not work, (the head[i] is wrong)

}

I know the code above will not work but gives you an idea what I want to do.

I could do it like this

and so on but I would like to learn a simpler way.Code:`Multiply head1 = new Multiply();`

Multiply head2 = new Multiply();

Multiply head3 = new Multiply();

Multiply head4 = new Multiply();

I am serious about learning Java so that is why I've joined this forum. I've borrowed some books from the library on the subject so am learning along. Thanks