Home    Post Archive    RSS XML    Contact    Search

Marketplace

4elements

4elementsImport table ArrayList except null elements?

Another newbie question java. How do I import a table into an ArrayList with the exception of null values? I find painting to be uncompromising when it comes to move and remove items and by reducing or increasing the size of the table. I need to use a table during the first part of the program for indexing and export the contents of an ArrayList with the exception of null elements. The last part of my program needs to iterate using the new cut arraysize actual number of elements which trimtosize is very useful.

The real problem I have with using ArrayList at the very beginning is that when I set an item value to NULL, it affects the values of the elements of success. For example, I have an ArrayList of 1, 2, 3, 4, 5. If I put the value of the index 2 to null, the output becomes 1.2, null, 3, 4, so now I'm missing 5. It is easier to remove it instead of setting to null, but the index elements are essential ... If you can suggest any way I can put the values of elements of zero without the other elements are affected, it would be better ..

Thank you in advance.

I do not think this is possible, although I could see how you might think that this is possible, since an array is an object. The collection classes are useful because they have this feature built in. You can use Arrays.toList () to convert a table into a list. I think List.add () returns FALSE, the data to null. It seems that you want to add a zero to an index. Have you tried using List.add (T value, int index)?

Posted on February 17, 2010.
Share |

Comments

There are no comments.

Leave a Comment

Your Name
Your Email
Comments
Human Check. Type 5016.

Newest Articles
Shaving Blade Sharpener
Laser Hair Removal In Newport Beach Ca
Affordable Laser
Kent Hairbrushes
Razor Drivers
Remington Chainsaw
Laser Electrolysis
Braun 5790

Network
Tipsiness.com
Credit Ally
Money Mattress
Moneymakers Etc
Investment Boss
Loan Watchers
Insurance Fortune
Insurance Trouble
Galactic Insurance
Drink Aficionado
Worldwide Snacks
House Divine