Syntax โ The length of the string is determined by the length() method of the string.
Parameters โ No parameters.
Return Value โ An Integer showing the length of the string.
Example
Following is an example of the usage of strings in Groovy โ
class Example { static void main(String[] args) { String a = "Hello"; println(a.length()); } }
When we run the above program, we will get the following result โ
5
Previous Page:-Click Here
Pingback: Groovy - Strings - Adglob Infosystem Pvt Ltd
Great, thanks for sharing this article. Really Great.