# List Interface - ArrayList

![List Interface](https://513632279-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHGT1oKZbTmlBrsOv_R%2F-MIXlUlpq-8m5voQvxwf%2F-MIXlZA7j0-K_ajbQyNb%2Fimage.png?alt=media\&token=a1c1df4d-d57c-499d-9350-6053ebd97dcc)

Vector(old) and ArrayList(new) are almost same.\
ArrayList is advanced version of Vector.\
Vector has Syncronization and Array doesn't have.

* Deleting Data Process of ArrayList

1. Copy and following data. (When Deleting last data, it will be skipped.)
2. Last data is changed to null.
3. Decrease size.

When deleting from the first, Copying data does occured.

```java
for(int i = 0; i < list.size();i++) 
    list.remove(i);
```

When deleting from the last, Copying data does not occured.=>Much faster!

```java
for(int i = list.size(); i >= 0;i--) 
    list.remove(i);
```
