• Post Reply Bookmark Topic Watch Topic
  • New Topic

using toArray in searchcriteria

 
Kevin Mc Cusker
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is wire. Could you find out what kinds of objects are in the Object array?
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!