| Author |
referencing an Array
|
Jim Rock
Ranch Hand
Joined: Mar 20, 2001
Posts: 39
|
|
Can you have a space between the array index and array name for example are both the following references legal (assuming the array has been declared and constructed): x[25] = 1; x [25] = 1;
|
 |
Rick Rodriguez
Ranch Hand
Joined: Jun 02, 2001
Posts: 44
|
|
Jim, As I mentioned in your previous post, in your example above, the Java compiler does not care about the spaces you place before the open bracket.
|
 |
Dave Vick
Ranch Hand
Joined: May 10, 2001
Posts: 3244
|
|
Jim Not to be rude, but instead of asking these types of questions you should write a little code and test it. You'll probably get a faster answer and you'll also get more practice that way too.. Dave
|
Dave
|
 |
Jim Rock
Ranch Hand
Joined: Mar 20, 2001
Posts: 39
|
|
Dave I was pretty sure I knew the answer. However, my understanding of this bulliten board is that it is for posting questions that have general interest. I think this question was worth having others see.
Originally posted by Dave Vick: Jim Not to be rude, but instead of asking these types of questions you should write a little code and test it. You'll probably get a faster answer and you'll also get more practice that way too.. Dave
|
 |
 |
|
|
subject: referencing an Array
|
|
|