How can i remove an element from an array
1 posts in topic
Flat View  Flat View

Posted By:   pranesh_sharma
Posted On:   Saturday, March 23, 2002 09:56 PM

i am comapring the values in a array of int if a value of integer is maximum then it will be removed from an array. is it possible to remive an element from array?

Re: How can i remove an element from an array

Posted By:   AlessandroA_Garbagnati  
Posted On:   Sunday, March 24, 2002 01:15 AM


Yes, but you need to recreate a new array and copy in there all the values except the one you want to remove.

If you need to manipulate the elements of an array, I would suggest you to consider using one of the implementation of the List interface, like ArrayList.
About | Sitemap | Contact