What is List in Java?
List is class in which we can do modifications. In this we can do many methods like size, length, method, sorting, searching.
There are two types :
In array list we can do methods like size, search, sorting using collection and collections.
Arraylist a = new Arraylist();
Linked list: In linked list, We have two blocks in first blocks store actual data and second block stores address of next data.
There are two linked list:
Singly Linked list: In this, we can follow or read data from one side only and there are two blocks in which one stores data and other stores address of next data.
Doubly linked list:
In this, we can store data and two address i.e. previous and next. There is three blocks in which middle block consists of data and first block consists of address of previous data and third block consists of address of next data.