HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
String Methods : Return the first character (0) of a string
The charAt()
method returns the character at the specified index in a string.
The index of the first character is 0, the second character is 1, and so on.
public char charAt(int index)
Parameter | Description |
---|---|
index | An int value representing the index of the character to return |
Returns: | A char value at the specified index of this string.The first char value is at index 0 |
---|---|
Throws: | IndexOutOfBoundsException - if index is negative or not less than the length of
the specified string |
❮ String Methods