---
title: "Discussion on \"Equals and string comparisons\" | Hashnode"
description: "Discussion on \"Equals and string comparisons\". Hi! Today we will talk about a very important and interesting topic, namely, comparing objects with objects.\nSo in Java, when exactly would object A be equal to object B? \nLet's try writing an example:\n\npublic class Car {\n\n   String model;\n   int max..."
url: "https://hashnode.com/posts/equals-and-string-comparisons/5cf0282f29a4769e2c632f6f"
---

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

Discussion

# [Equals and string comparisons](https://hashnode.com/post/equals-and-string-comparisons?utm_source=hashnode&utm_medium=feed)

Hi! Today we will talk about a very important and interesting topic, namely, comparing objects with objects. So in Java, when exactly would object A be equal to object B? Let's try writing an example: public class Car { String model; int max...

May 30, 2019 · hashnode.com  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#learn](https://hashnode.com/tag/learn)
-   [#learning](https://hashnode.com/tag/learning)
-   [#e-learning](https://hashnode.com/tag/e-learning)

## Written by

[Alex Yelenevych](https://hashnode.com/@alexyelenevych)

@alexyelenevych

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

CMO at CodeGym.cc

Experienced product manager and marketer with a rich history of working in the computer software industry. Currently working as Chief Marketing Officer in CodeGym. I love Computer Science and Java and, as many of CodeGym&#39;s students, I used to learn Java and know all the struggles on this way.

## Responses 1

Markdown supported · ⌘↵ to post

[infocampus2000](https://hashnode.com/@infocampu2000)

[Jun 20, 2023](https://hashnode.com/posts/equals-and-string-comparisons/5cf0282f29a4769e2c632f6f/comment/64912a50c167b41645fd06f1)

Your style is unique in comparison to other people I've read stuff from. Thanks for posting when you've got the opportunity, Guess I'll just book mark this site.

<a href=”[infocampus.co.in/web-designing-training-in-bangal…](https://infocampus.co.in/web-designing-training-in-bangalore.html%E2%80%9D%3EWeb) Designing Training in Bangalore</a>

<a href=”[infocampus.co.in/web-designing-training-in-bangal…](https://infocampus.co.in/web-designing-training-in-bangalore.html%E2%80%9D%3EWeb) Designing Course in Bangalore </a>

<a href=”[infocampus.co.in/web-development-training-in-bang…](https://infocampus.co.in/web-development-training-in-bangalore.html%E2%80%9D%3EWeb) Development Training in Bangalore</a>

<a href=”[infocampus.co.in/web-development-training-in-bang…](https://infocampus.co.in/web-development-training-in-bangalore.html%E2%80%9D%3EWeb) Development Course in Bangalore </a>

<a href=”[infocampus.co.in/front-end-development-course-in-…](https://infocampus.co.in/front-end-development-course-in-bangalore.html%E2%80%9D%3EFront) End Development Training in Bangalore</a>

<a href=”[infocampus.co.in/front-end-development-course-in-…](https://infocampus.co.in/front-end-development-course-in-bangalore.html%E2%80%9D%3EFront) End Development Course in Bangalore </a>
