Advertisements
Advertisements
प्रश्न
Differentiate between the following:
length and length()
Write the difference between length and length() functions.
अंतर स्पष्ट करें
उत्तर
S. No. | length | length() |
1. | This method is used to determine the size of an array. | The length() method is used to determine the size of a string. |
2. | Example: int a[] = new int[100] | Example: Strings = "summer"; |
3. | In the above example, a.length returns 100 | In the above example, s.length() returns 6 |
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?