What is ArrayList in Java and Why we use it when coding ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is ArrayList in Java and Why we use it when coding ?

Recently i am perticipating a a trainning session on android .The trine said we will be using arrayList a lot . So just curious about how it really use and why !

19th May 2018, 9:37 PM
MD Omer Arafat
MD Omer Arafat - avatar
2 Answers
0
ArrayList<Integer> list = new ArrayList<>(); list.add(5); list.get(0);
19th May 2018, 10:17 PM
Jonas Schröter
Jonas Schröter - avatar
0
An ArrayList is like an array, but you can change it's size.
19th May 2018, 10:18 PM
Jonas Schröter
Jonas Schröter - avatar