4. I am familiar with Actionscript programming, and I often used the "<=" (less than or equal to) or ">=" (greater than or equal to) operators. However in Eclipse, I have been unable to use such operators. Here's my situation. Defined variable: final EditText UserNumber = (EditText) findViewById (R.id.editText1); And here's the use: Yes, char is just like any other primitive type, you can just compare them by ==. You can even compare char directly to numbers and use them in calculations eg: public class Test { public static void main (String [] args) { System.out.println ( (int) 'a'); // cast char to int System.out.println ('a' == 97); // char is automatically promoted to Java Comparison Operators. Comparison operators are used to compare two values (or variables). This is important in programming, because it helps us to find answers and make decisions. The return value of a comparison is either true or false. These values are known as Boolean values, and you will learn more about them in the Booleans and If To compare Strings for equality, don't use ==. The == operator checks to see if two objects are exactly the same object. Two strings may be different objects, but have the same value (have exactly the same characters in them). Use the .equals() method to compare strings for equality. In Java, the equals() the method is used to determine if two objects are equal. It is defined in the Object class, which is the root of the Java class hierarchy, and it is inherited by all Java 19. Overriding the equals method is necessary if you want to test equivalence in standard library classes (for example, ensuring a java.util.Set contains unique elements or using objects as keys in java.util.Map objects). Note, if you override equals, ensure you honour the API contract as described in the documentation. The Object class equals method compares the object using reference. i.e. a.equals(a); always returns true. If we are going to provide our own implementation then we will use certain steps for object equality. Reflexive: a.equals(a) always returns true; Symmetric: if a.equals(b) is true then b.equals(a) should also be true. It's possible to check equality of Optional by it's existed method equals. It compares two Optional by it's inner values. It compares two Optional by it's inner values. package java.util; public final class Optional { The Object class has some basic methods like clone (), toString (), equals (),.. etc. The default toString () method in Object prints “class name @ hash code”. We can override the toString () method in our class to print proper output. For example, in the following code toString () is overridden to print the “Real + i Imag” form This means they were put in two different buckets in the HashSet, so they never got compared with equals in the first place. I would add. public int hashCode() { return name.hashCode(); } Notice id isn't used in the hashCode because it isn't used in equals either. (P.S. I'd also like to point out the irony of having an id that isn't used in equals. T7v98Wo.