To convert char1 to an uppercase character, we call the toUpperCase() static method from the Character class and pass char1 as an argument . The same goes to convert char2 to lowercase; we call the toLowerCase() method.
To convert char1 to an uppercase character, we call the toUpperCase() static method from the Character class and pass char1 as an argument . The same goes to convert char2 to lowercase; we call the toLowerCase() method.