English

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

Advertisements
Advertisements

Question

Describe the purpose of the following function with its syntax:

equalsignoreCase()

Code Writing
Advertisements

Solution

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
  Is there an error in this question or solution?
Chapter 4: String Handling - EXERCISES [Page 289]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
EXERCISES | Q VIII. 10. | Page 289
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×