---
title: "Discussion on \"Why is 1 == 1 is true but 1000 == 1000 is false When dealing with Wrapper Classes in Java?\" | Hashnode"
description: "Discussion on \"Why is 1 == 1 is true but 1000 == 1000 is false When dealing with Wrapper Classes in Java?\". For Explanation watch video\nhttps://youtu.be/5yk-1MoK3QY\n \nIn Java, the behavior where 1 == 1 is true but 1000 == 1000 is false when dealing with wrapper classes can be surprising. This is due to how Java handles object comparison and the concept of ..."
url: "https://hashnode.com/posts/why-is-1-1-is-true-but-1000-1000-is-false-when-dealing-with-wrapper-classes-in-java/66e701c2bf27e0349ac991de"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why is 1 == 1 is true but 1000 == 1000 is false When dealing with Wrapper Classes in Java?](https://realnamehidden.hashnode.dev/why-is-1-1-is-true-but-1000-1000-is-false-when-dealing-with-wrapper-classes-in-java?utm_source=hashnode&utm_medium=feed)

For Explanation watch video https://youtu.be/5yk-1MoK3QY In Java, the behavior where 1 == 1 is true but 1000 == 1000 is false when dealing with wrapper classes can be surprising. This is due to how Java handles object comparison and the concept of ...

Sep 15, 2024 · 3 min read · realnamehidden.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#interview](https://hashnode.com/tag/interview)

## Written by

[realNameHidden](https://hashnode.com/@realNameHidden)

@realNameHidden · India

  
[View profile](https://hashnode.com/@realNameHidden)

spring boot

subscriber to our youtube channel url: https://www.youtube.com/@realNameHiddenN

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
