Advertisements
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 [पृष्ठ २८९]
