get first character of string java

Java
var string = "freeCodecamp";

string.charAt(0); // Returns "f"
Source

Also in Java: