The String length() method returns the number of characters in a specified string. The general form of this length() method is as follows:
For example, a String is given as follows:
Now to obtain the number of characters in str, use the length() method:
It will return 5, as this is the number of characters in str.
Get certified in first attempt download scja - SCJA simulation. Pass SCJA in first attampt.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
