diff --git a/guide/english/java/equality/index.md b/guide/english/java/equality/index.md index 6d07c7b415..d50afd3d09 100644 --- a/guide/english/java/equality/index.md +++ b/guide/english/java/equality/index.md @@ -64,5 +64,17 @@ For example, the `java.util.Set` interface specifies that a `Set`'s `equals()` m However, if a class does not override the default `equals()` implementation, the default implementation will apply, which simply uses the `==` operator to compare the two objects. +## The `.equalsIgnoreCase()` Method + +This built-in function in java is used to compare the equality of 2 strings return true or false depending on the match but this function does not see if the characters are in upper case or in lower case. +Example: + +```java +String s1="DEMO for Equality"; +String s2="Demo for equality"; +System.out.println(s1.equals(s2)); //false +System.out.println(s1.equalsIgnoreCase(s2)); //true +``` + #### More Information: - [Oracle Java Docs : Equality Operators](https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.21)