New course! Every coder should learn Generative AI!
Try a free lesson0
Why array index value starts from 0 ? Why not from 1 ?
2 Answers
+ 1
1. it has to do with bytes
2. it is easer to say eg. int i < arr.length if it starts from 0 if it would start from 1 this code would let out the last element in the array