Tagged articles
11 articles
Page 1 of 1
Java Tech Enthusiast
Java Tech Enthusiast
Sep 21, 2025 · Fundamentals

How an Object Can Equal Two Different Values in JavaScript and Java

This article explains the clever trick of making a single object satisfy multiple equality checks in JavaScript using a mutable valueOf method, and shows how a similar effect can be achieved in Java through custom methods and state variables, highlighting the underlying mechanism.

JavaScriptMethod OverloadingObject Comparison
0 likes · 6 min read
How an Object Can Equal Two Different Values in JavaScript and Java
FunTester
FunTester
Jan 7, 2025 · Backend Development

Using Apache Commons Lang 3 for Efficient Object Comparison in Java

This article introduces Apache Commons Lang 3, explains its key utilities, and demonstrates how to integrate the library with Maven and employ DiffBuilder and ReflectionDiffBuilder to compare Java objects, generate detailed difference reports, and simplify debugging and testing processes.

Apache Commons LangDiffBuilderJava
0 likes · 9 min read
Using Apache Commons Lang 3 for Efficient Object Comparison in Java
ITPUB
ITPUB
Dec 22, 2024 · Fundamentals

Why Does Comparing Two Integer Objects in Java Sometimes Return True?

This article explains why using the == operator on two Integer objects in Java can yield true for some values and false for others, covering Integer caching, the role of Integer.valueOf, and the correct way to compare Integer values with equals.

JavaObject Comparisonequals
0 likes · 7 min read
Why Does Comparing Two Integer Objects in Java Sometimes Return True?
Su San Talks Tech
Su San Talks Tech
Dec 20, 2023 · Fundamentals

Why Does Comparing Two Java Integer Objects Sometimes Return True?

This article explains why using the == operator on two Java Integer objects can yield true for values between -128 and 127 but false for larger numbers, detailing the Integer cache mechanism, reference vs value comparison, and the proper use of equals for value equality.

JavaObject Comparisonequals method
0 likes · 6 min read
Why Does Comparing Two Java Integer Objects Sometimes Return True?
Amap Tech
Amap Tech
May 8, 2020 · Backend Development

Common Java Coding Pitfalls and How to Avoid Them

These seven Java coding pitfalls—from improper object comparison and ternary‑operator null handling to generic type mismatches, BeanUtils copying errors, missing equals/hashCode, and CGLIB proxy issues—are explained with bytecode insights and concrete avoidance strategies such as consistent types, proper generics, correct overrides, and avoiding final members.

GenericsJavaObject Comparison
0 likes · 26 min read
Common Java Coding Pitfalls and How to Avoid Them
Java Captain
Java Captain
Dec 12, 2017 · Fundamentals

Understanding Integer and String Comparison in Java

This article explains Java's Integer and String comparison quirks, detailing how autoboxing caches values between -128 and 127, why '==' behaves differently for objects versus primitives, and demonstrates these concepts with clear code examples and explanations.

AutoboxingObject ComparisonString
0 likes · 7 min read
Understanding Integer and String Comparison in Java