How do you get the last character of a string?

How do you get the last character of a string? If you want to retrieve the last character from String then you can call charAt(length -1) where length is the length of a given String. For example, if given String is “Avengers” then “Avengers”. charAt(7) will return letter “s” the last letter, which is from […]

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top