The int value inside the switch parentheses is what it's trying to match. In this case, switch(i) means that it will try to match whatever 'i' is.
It compares this value (i) to the int value following each "case" keyword. So the code following "case 0:" will execute if i is zero.
Maybe you are asking because these look like "indexes" that need to start at zero and increment (0, 1, 2, 3, 4...), but that is not what they are. These are just specific cases to match. So you could have something like this...
Does that help?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Joined: Mar 04, 2011
ohhhhhhhhhhh i get it now... so if (i) was equal to 124 you would put 'case 124'??
I am assuming in that situation it would probs be easier to use if else if ladder???