This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

declaring arrays

 
Jim Rock
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic