Series: class Character

Java class Character static methods explained in simple terms with programs, screenshots

Use equalsIgnoreCase() with Character objects

We have seen earlier comparing two Character objects with equals() method. It was case sensitive comparison. Infact, Character class does not have a method like equalsIgnoreCase(). But String has one. Apply a small technique to do case insensitive comparison with characters. Just convert both the characters in comparison either to uppercase or lowercase. For this …

Use equalsIgnoreCase() with Character objects Read More »