हिंदी

Describe the purpose of the following function with its syntax: length() - Computer Applications

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:

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 4: String Handling - EXERCISES [पृष्ठ २८९]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 4 String Handling
EXERCISES | Q VIII. 4. | पृष्ठ २८९
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×