+ 7
Do I save a memory when I'm declaring an array, instead of storing a list of values, or I will just save the time? [answered]
3 Answers
+ 11
No, an array needs more memory than storing primitive datatypes. But it's worth it, if it can improve readability of the code and of course it's easier to access the elements or to loop through it.
+ 4
Thanks for your answers