User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







java:lang:string:charat

charAt

charAt(int index)

description of charAt

returns char value at the specified index of string.

example of charAt in java

package lang;
 
public class Lang {
 
    public static void main(String[] args) {
 
        String str = "test 1234";
        char chr;
 
        chr = str.charAt(1);
 
        System.out.println(chr+" is the 2 char");
    }
}

output of charAt

 e is the 2 char

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
java/lang/string/charat.txt · Last modified: 2024/02/16 01:12 (external edit)

Impressum Datenschutz