aspose file tools*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "declaring arrays" Watch "declaring arrays" New topic
Author

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.
 
Don't get me started about those stupid light bulbs.
 
subject: declaring arrays