Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to compare two characters in java

If your input is a character and the characters you are checking against are mostly consecutive you could try this:

if ((symbol >= 'A' && symbol <= 'Z') || symbol == '?') {
    // ...
}
Source by www.javatpoint.com #
 
PREVIOUS NEXT
Tagged: #compare #characters #java
ADD COMMENT
Topic
Name
3+6 =