+ 1

How to delete arrays element?

Please help to understanding how to delete arrays element. Thank you.

8th Feb 2017, 11:57 PM
Biobii
Biobii - avatar
3 Answers
+ 1
You can't change the length of an array. Maybe you can make a list from your array with Array.asList method, delete your element and then make an array again with ArrayList.toArray method
9th Feb 2017, 12:35 AM
orsi
+ 1
I mean how to delete an arrays element manually. Dont need import any package/class from Java. Please help me to understanding it.
9th Feb 2017, 1:51 AM
Biobii
Biobii - avatar
0
if you'r using a class array i believe array[i] = null. Otherwise, you should put a neutral value like 0 or ' '
9th Feb 2017, 12:04 AM
Matheus Pinheiro de Sousa
Matheus Pinheiro de Sousa - avatar