list and map
-
on what criteria we will decide whether to use map or list?
-
on what criteria we will decide whether to use map or list?
-
i have one confusion that when we declare a list as below List lt = new Arraylist(); Then in that case what value it can store i.e same type of value or it is capable of storing any type of variables or objects.
Jishnu
-
i have one confusion that when we declare a list as below List lt = new Arraylist(); Then in that case what value it can store i.e same type of value or it is capable of storing any type of variables or objects.
Jishnu
-
Many things you need to know, 1) IF you store just one object, use List, if you have two object key and value use Map. 2) List is ordered, your objects will be stored in the order on which they are inserted, Map is not ordered, unless you use sorted ones. Source: See List vs Set vs Map
-
Many things you need to know, 1) IF you store just one object, use List, if you have two object key and value use Map. 2) List is ordered, your objects will be stored in the order on which they are inserted, Map is not ordered, unless you use sorted ones. Source: See List vs Set vs Map