java – Count the number of characters in a string?

it is necessary to count the total number of characters of a string when the word is written. I would like to know how to create the code, I think it is a for.

public class ExerciseDeString {
public String transforms forMaiusculo (Text String) {
return texto.toUpperCase ();
}

public String transformForMinusculo (Text String) {
return text.toLowerCase ();
}

public String countLestras (Text String) {

}

}