length() — Returns the length (number of characters) in a string.
int length(string)
String phrase = "Data types in Java"; int length = phrase.length(); // Outputs 18
Clickable & Draggable!