हिंदी

Give the output of the following String class method: "devote". compareTo("DEVOTE")

Advertisements

प्रश्न

Give the output of the following String class method:

"devote". compareTo("DEVOTE")
संक्षेप में उत्तर
Advertisements

उत्तर

32

Explanation:

The compareTo() function compares two strings and returns the difference in their ASCII codes.

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

APPEARS IN

रुपा पंडित Computer Applications [English] Class 10 ICSE
अध्याय 10 String Handling
Exercises | Q 6. (b) | पृष्ठ २४९
Advertisements
Share
Notifications



      Forgot password?
Use app×