| Author |
array with positions not defined
|
Gustavo Siqueira
Ranch Hand
Joined: Jun 15, 2011
Posts: 94
|
|
Hi!
How to create one array without specify the amount of positions ? Or is, one array infinite.
Thanks advance!
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2928
|
|
|
For Array you would have to specify the size. You can try using List and then you can convert that List into a Array.
|
Mohamed Sanaulla | My Blog
|
 |
Gustavo Siqueira
Ranch Hand
Joined: Jun 15, 2011
Posts: 94
|
|
Thanks you!
But as ?
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Gustavo Hackum wrote:
How to create one array without specify the amount of positions ?
Not possible!
Gustavo Hackum wrote:
Or is, one array infinite.
java.util.ArrayList . but actually it is an array!
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2928
|
|
You can have read about the toArray
Also there are lot of posts in the forum that are related to the use of toArray.
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2928
|
|
|
Converting a List into an Array?
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
|
|
|
Do you really mean infinite?
|
 |
Gustavo Siqueira
Ranch Hand
Joined: Jun 15, 2011
Posts: 94
|
|
Okay!
Thanks you all that responded!
Problem solved!
|
 |
 |
|
|
subject: array with positions not defined
|
|
|