How-to articles, tricks, and solutions about COMPARISON
To compare two char values in Java, you can use the == operator, just like you would with any other primitive type. For example:
You can convert both strings to lowercase or uppercase (using the lower() or upper() method) before doing the comparison.
You can compare dates in Java by using the compareTo() method of the java.util.Date class. This method compares the date object on which it is called with the date object passed as an argument to the method
In Python, you can test multiple variables for equality against a single value using the == operator.
To compare two lists in Java, you can use the equals() method of the List interface.
When comparing strings using the '==' operator, the comparison is based on the actual characters in the string.