Why does the array count since 0? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Why does the array count since 0?

24th Aug 2016, 7:43 PM
Fram Rodríguez
Fram Rodríguez - avatar
2 ответов
+ 1
Because the indexes are identified by zero-based numeration in Java, and in most of the programming languages.
24th Aug 2016, 7:45 PM
Fram Rodríguez
Fram Rodríguez - avatar
0
Every programmer starts counting from zero :) You need to get used to this because it is used in many other situations.
24th Aug 2016, 8:39 PM
Nikoleta Shopova
Nikoleta Shopova - avatar