Oct 12, 2024
Integer, Long, Double, Float are wrapper classes which are all defined as value-based classes (https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Integer.html) which means always use equals to compare them...Trying to make micro optimization is wrong... let the JVM take that job...