Q. How would you compare two strings for equality, ignoring their case?
Solution:
The equalsIgnoreCase() method compares two strings lexicographically, ignoring case differences. Using == checks for reference equality (if they are the same object), not value equality.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.