T
T
thror)))2014-04-23 13:35:55
Java
thror))), 2014-04-23 13:35:55

How to remove an element of a Java array?

There is an array in Java , you need to remove an element (cell) from it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Vershinin, 2014-04-23
@m1shaW

You can't delete a cell. You can only reset the value. If you need dynamic arrays (arrays of variable length), then you need collections, namely ArrayList (or, if thread safety is important to you, Vector).
You can read about it here: habrahabr.ru/post/128269

V
vvsh, 2014-04-27
@vvsh

You can zero out and shift all elements one position to the left.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question