October 2017
Beginner
318 pages
7h 26m
English
The location of our array is accessed by our program when we call the arrayVar variable. This allows us to run lines of code such as the following:
arrayVar[2] = 'c';
Our arrayVar variable gives us access, essentially, to seven different character variables. When we don't want to assign a new array to our arrayVar variable, we're probably going to be accessing these character variables as individuals. We do this simply using the variable name of arrayVar, following it with square brackets, which include the index of the individual character we'd like to access. Remember, when our computers count indexes, they almost always begin with 0. So, in Java, our seven-character array has these indexes: 0, 1, 2, 3, 4
Read now
Unlock full access