What is the correct way to create a object array in java? [duplicate]

This question already has an answer here:

I’ve seen examples such as:

Type arrayname[] = new Type[];

also as written as:

Type[] arrayname = new Type[]

I am quite confused about such expressions!

Where exactly should I put the []?

Source: syntax

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.