हिंदी

Describe the purpose of the following function with its syntax: equalsignoreCase()

Advertisements

प्रश्न

Describe the purpose of the following function with its syntax:

equalsignoreCase()

कोड लेखन
Advertisements

उत्तर

This function compares two strings to see if they are identical, ignoring case. The function returns true if the two strings are identical, regardless of case. 

Example: 

String s1 ="JAPAN"; 
String s2 = "japan";
boolean b = s1.equalsIgnoreCase(s2)
System.out.println(b); 

Output: true

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

APPEARS IN

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



      Forgot password?
Use app×