How can i fix this equals on primitive type(int)

equals() is used for Objects (String, Integer, etc…)

For primitives like int, boolean, char etc, you have to use ==

Leave a Comment