String Length
The number of UTF-16 code units in a String.
What is String Length in Java?
String Length — The number of UTF-16 code units in a String.
class Location {
String city = "Denver";
int characterCount = city.length();
char firstCharacter = city.charAt(0);
}
Level: Apprentice · More Java terms at this level
Updated