• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to understand the Output

 
Anurag Jai
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am unable to understand the below behaviour....


It is printing the output as "Not Equal".
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anurag,

Welcome to CodeRanch!

Please, UseCodeTags. For now, I've edited your post, however, please keep it in mind for further posts.

Also, please SearchFirst. You can get various similar issues and explanations in this forum only (you can start your search by following 'Threads others viewed' on this page).

I hope this helps.
 
Anurag Jai
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to understand what you are saying.
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anurag Jai wrote: I am unable to understand what you are saying.

What exactly you didn't understand?

Did you try to search for 'threads others viewed'? Also, in my previous post, two words are underlined by a faint dotted line. Please click those words for further info.

I hope this helps.
 
Anurag Jai
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to find where is "Thread others Viewed".
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anurag Jai wrote: I am not able to find where is "Thread others Viewed".

Do ctrl + F, and type 'Threads others viewed'. Hit enter key few times - until it reaches to(almost) bottom of the page.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class String says about String.replace -
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.


So, two new objects got created, each with a different address.

Regards,
Dan
 
Anurag Jai
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks All....Clearly Understood.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic