The moose likes Beginning Java and the fly likes declaring arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "declaring arrays" Watch "declaring arrays" New topic

declaring arrays

Jim Rock
Ranch Hand

Joined: Mar 20, 2001
Posts: 39
can you have a space between your brackets [] and array name
for example are the following two declarations the same
int[] x new int[25];
int [] x new int [25];
Rick Rodriguez
Ranch Hand

Joined: Jun 02, 2001
Posts: 44
Actually, the Java compiler does not care about the spaces. Any of the declarations/initializations in your post will compile without any errors.
I tried it myself.
I agree. Here's the link:
subject: declaring arrays
jQuery in Action, 3rd edition