Java String length() method
The length() of a String object returns the length of this string. The length of java string is same as the unicode code units of the string.
There is no parameter for length() and it returns the count of total number of characters. Also note that the method is not static, this means that the method can only be invoked through a Java String instance.
How check the String is empty or not?
The following Java program check whether the string is empty or not.
Printing one char on each line in Java
The following program display each character in a string one by one.