Answers for "how to check equality of characters in java"

1

check if char equals java

//Method 1
if (CHAR == VALUE) {
  System.out.println("CHAR matches with VALUE");
}

//Method 2
if (CHAR.equals(VALUE)) {
  System.out.println("CHAR matches with VALUE");
}
Posted by: Guest on September-26-2021
0

check if two characters are equal java

if('a' == 'a') should be True since both characters are equal
if('A' == 'a') should be False since the ASCII code of the characters are not equal
Posted by: Guest on February-25-2022

Code answers related to "how to check equality of characters in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language