File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes using toArray in searchcriteria Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "using toArray in searchcriteria" Watch "using toArray in searchcriteria" New topic
Author

using toArray in searchcriteria

Kevin Mc Cusker
Greenhorn

Joined: Aug 06, 2003
Posts: 21
Hi all,
Im using an arraylist to add all matches i get in the searchcriteria method. Say for example I have two matches. I then use the following line of code to change it into an array:

Object[] toArray = myArrayList.toArray();

I dont know why but the size of this array is always 10 times larger than the arraylist - 20 in this example!!.

Any comments welcome
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
It is wire. Could you find out what kinds of objects are in the Object array?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using toArray in searchcriteria