Note that this comparison is case-sensitive . If our names were recorded in lowercase, the statement name. charAt(i) == ‘G’ would never evaluate to true. If the character at index position i is equal to G, our counter increases by 1.
Note that this comparison is case-sensitive . If our names were recorded in lowercase, the statement name. charAt(i) == ‘G’ would never evaluate to true. If the character at index position i is equal to G, our counter increases by 1.