Can you define an array without a fixed number of indexes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can you define an array without a fixed number of indexes?

13th Aug 2016, 11:15 PM
Stu
4 Answers
+ 5
No. Arrays are static. Use List instead. They are dynamic and you can declare them without specifying the size.
14th Aug 2016, 12:18 AM
Alireza M
Alireza M - avatar
0
thanks that's really helpful
14th Aug 2016, 12:22 AM
Stu
0
2
17th Sep 2016, 10:26 AM
Huong BUi
Huong BUi - avatar
- 2
you can declare array without specifying the size too. Is it because the compiler decides the size of the array?
14th Aug 2016, 6:30 AM
Máté Lencsés
Máté Lencsés - avatar