Describe the purpose and write the syntax of length() function.
18 Likes
It returns the length of the string i.e. the number of characters present in the string.
Syntax:
int <variable-name> = <string-variable>.length();
Answered By
10 Likes
Describe the purpose and write the syntax of trim() function.
Describe the purpose and write the syntax of toLowerCase() function.
Describe the purpose and write the syntax of replace() function.
Describe the purpose and write the syntax of compareTo() function.