This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes array with positions not defined Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "array with positions not defined" Watch "array with positions not defined" New topic
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
    
  15

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
    
  15

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
    
  15

Converting a List into an Array?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32708
    
    4
Do you really mean infinite?
Gustavo Siqueira
Ranch Hand

Joined: Jun 15, 2011
Posts: 94

Okay!
Thanks you all that responded!
Problem solved!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: array with positions not defined
 
Similar Threads
Choosing technology for application: Relational database versus XML Schema.
Implementing Comparable Interface with TreeSets
DataStructure for getting the maximum element in int array
Moving Circles Simultaneously
Formatting Java Code