Define add function of java for adding some elements in list. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Define add function of java for adding some elements in list.

How to do it?

28th Jan 2019, 11:27 AM
Kushang Shah
Kushang Shah - avatar
1 Answer
0
Here are some code examples from the official Java Course: https://code.sololearn.com/793/#java (ArrayLists) https://code.sololearn.com/794/#java (LinkedLists) These work relatively similar to normal Arrays but the full name of the data type (e.g. Integer) needs to be declared and they need to be imported through java.util. ArrayLists are used as a quick flexible tool, whereas LinkedLists are for larger data handling. Normal Arrays are not expandable.
28th Jan 2019, 12:31 PM
Tunami
Tunami - avatar