I have an array like below:
PersonClass[] person= {
new PersonClass("90234234434", "John", "Smith", 22, "Street 22/5", 10//this is priority from 0 up to 10),
...
...
};
Then I search for a security ID that starts from 98
for(int n = 0; n < person.length; n++)
{
if(person[n].getSecId().contains("98"))
{
System.out.println(person[n].toString());s
//delete this object from person array
}
}
Now my question is: Can I delete this object directly from the array, if not how can I convert it into collection eg. ArrayList.