Created
June 30, 2021 13:17
-
-
Save aniketmlk6/7ca71ffb245df90d5632c9b2f901b670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
char char1 = 'a'; | |
char char2 = 'b'; | |
int comparison = Character.compare(char1, char2); | |
if (comparison==0) { | |
System.out.println("the characters are same"); | |
} | |
else { | |
System.out.println("the characters are different"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment