How to read characters of a string

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Filament.io 0 Flares ×

To process a string, character by character we can use the charAt() method of the String class. Use this method in a for loop.

The same approach can be used to print a string in reverse.