Advertisements
Advertisements
प्रश्न
Describe the purpose of the following function with its syntax:
length()
कोड लेखन
उत्तर
The purpose of this function is to return a String's length. (The characters' number). An integer value is the result.
Example:
String d = "Simpleton";
System.out.println(d.length());
Output: 9
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 4: String Handling - EXERCISES [पृष्ठ २८९]