Strings as Set of Characters

Let's practice few methods that access or iterate over a string.

Identifying a particular character

You may think of a string as an array of characters. Each character is identified by a number called an index, just as it does for an array. The same golden rules apply:

  • The index of the first character in a string is 00
...
Access this course and 1400+ top-rated courses and projects.