0
Java method
Hello, what method is there in Java that gives us, for example, the first letter of a string, for example, if the first letter of a string is a number, something should be done
2 ответов
+ 3
CharAt(number) Takes a character from a string, the character number is specified in number
+ 2
Use
String str = "your string ";
char c = str.charAt(0);