char ch1 = 'A'; char ch2 = 'B'; boolean isEqual = Character.equals(ch1, ch2); //falseIn the above example, we can see that we have two characters 'A' and 'B'. We have used the equals() method to check whether these characters are equal or not. As 'A' and 'B' are different characters, the method returns false. Package library: The Character class is part of the java.lang package in Java, so no external package/library is required.