---
title: "Discussion on \"Strings in java explained\" | Hashnode"
description: "Discussion on \"Strings in java explained\". Through this blog I have explained strings in java in a simplified way which is very easy to understand for beginner"
url: "https://hashnode.com/posts/strings-in-java-explained/6330607a3ac18d0d78a03786"
---

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

Discussion

# [Strings in java explained](https://akashdevblog.hashnode.dev/strings-in-java-explained?utm_source=hashnode&utm_medium=feed)

Through this blog I have explained strings in java in a simplified way which is very easy to understand for beginner

Sep 25, 2022 · 5 min read · akashdevblog.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#strings](https://hashnode.com/tag/strings)
-   [#string](https://hashnode.com/tag/string)
-   [#java-beginner](https://hashnode.com/tag/java-beginner)
-   [#beginner](https://hashnode.com/tag/beginner)

## Written by

[Akash Dev](https://hashnode.com/@Akash2310)

@Akash2310 · India

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

Student @ITER SOA University

Hello! My name is Akash Dev and I am a computer science student with a passion for technology. I started this blog as a way to document my learning journey and share my knowledge and insights with others who are also interested in the field of computer science. I cover a wide range of topics including programming languages, software development, and emerging technologies. I hope my blog will be a valuable resource for anyone looking to learn more about computer science and technology. Join me as I explore the fascinating world of computer science and discover new things together.

## Responses 2

Markdown supported · ⌘↵ to post

[Niraj Kumar Gangale](https://hashnode.com/@iamnirajdotcom)

[Sep 28, 2022](https://hashnode.com/posts/strings-in-java-explained/6330607a3ac18d0d78a03786/comment/63341b6ffa20fa4bc8e516cb)

When we use the (==) operator java compares the value of the variables basically it checks whether the variables **are pointing to the same object or different.**

No Akash the, Equal to (==) does not compare that variable is pointing to the same operator it just compares the value itself.

```
String firstString = "Bunny";
String secondString = "Bunny";
```

Both the firstString and secondString have equal values of the address i.e. a Hexadecimal value, but saying they **are pointing to the same object or different** means also the same.

[Akash Dev](https://hashnode.com/@Akash2310)

[Sep 28, 2022](https://hashnode.com/posts/strings-in-java-explained/6330607a3ac18d0d78a03786/comment/63341b6ffa20fa4bc8e516cb#reply-63345606e594fa4ba3b8a9a9)

Thanks for mentioning. Basically what I want to say is (==) doesn't check for equality of values. It only checks identity. Simply I can say that it compares the object references.

[Aman Raj](https://hashnode.com/@huamanraj)

[Sep 25, 2022](https://hashnode.com/posts/strings-in-java-explained/6330607a3ac18d0d78a03786/comment/633072203ac18d0d78a0392e)

good blog! keep it up ❤

[Akash Dev](https://hashnode.com/@Akash2310)

[Sep 27, 2022](https://hashnode.com/posts/strings-in-java-explained/6330607a3ac18d0d78a03786/comment/633072203ac18d0d78a0392e#reply-6332640a67534f360ca95d50)

Thank you
