Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialCalvin Secrest
24,815 PointsThe first index of an array is ________
I can't figure out the if int[] a; or a[0]; will be the first index of an array?
4 Answers
Pablo Rocha
10,142 Pointsa[0]; is the first index of array a.
int[] a; defines variable a as an array of integers.
Calvin Secrest
24,815 PointsThank you everyone for all your responses
K Cleveland
21,839 PointsThis question is asking you to think about how arrays are indexed. When you make an array, does the first index start at 0, 1, or some other number?
M Gavin
17,906 PointsA[0] Index refers to the number inside the brackets ("0").
Hope that helps!
Calvin Secrest
24,815 PointsThanks for your reply, so is the first index of an array is int[] a; because when I key that code in the space but it was incorrect.