0

Often in java code I see people declaring arrays in 2 different ways.

Sometimes it is

Object[] someObjectArray = new Object[...];

And other times I see

Object someObjectArray[] = new Object[...];

I have always used the first one.

I have tried googling this, but I cant seem to word the question correctly, so is there any difference, and of so, how are the two used differently?

Kelan
  • 355
  • 4
  • 16
  • See [*Difference between int\[\] array and int array\[\]*](http://stackoverflow.com/questions/129178/difference-between-int-array-and-int-array) – Lynn Jul 22 '15 at 13:51
  • Okay, I hadn't come across that when looking for an answer. Thanks. – Kelan Jul 22 '15 at 13:55

0 Answers0