Martin

Senior Member
Dec 31, 2000
56,913
Haha there is indeed :)

It's about comparing string X== String y versus Stringx.isequal(StringY) or whatever and the difference between ="string" and = ("string")

Have to explain why the output is what it is in detail, and I have no idea :p
This is where java is slightly retarded. x.equals() is necessary because == only tests the equality of the object reference.

So:

String x = "dude":
String y = "dude";

x == x -> true
x == y -> false

x.equals(x) -> true
x.equals(y) -> true

x and y are two different objects, two different locations in memory. Even though their value is identical.

Does that help?
 

IrishZebra

Western Imperialist
Jun 18, 2006
23,327
This is where java is slightly retarded. x.equals() is necessary because == only tests the equality of the object reference.

So:

String x = "dude":
String y = "dude";

x == x -> true
x == y -> false

x.equals(x) -> true
x.equals(y) -> true

x and y are two different objects, two different locations in memory. Even though their value is identical.

Does that help?
It's helps excellently because you've validated the answers I just submitted :) TYVM :beer:

- - - Updated - - -

Everybody hear jacking off about the anniversary of JFKs visit.

Fucking sycophants.
 

Bisco

Senior Member
Nov 21, 2005
14,420

its the silent killer of people not hypertension i've come to believe to be honest :D . i speak about my self my blood boils quite quickly thanks to politics and certain group of politicians. :D

- - - Updated - - -

Looks like a new scandal is about to break out with Senator Bob Menendez of NJ again.

:numnum:


Drudge has picked up a scent...
what kind of scandal? something along the lines " i did not have sexual relationships with monica" ? or this is 3rd world kind of scandal
 

Nzoric

Grazie Mirko
Jan 16, 2011
37,877
I blacked out round 3 PM and woke up at Skt. Hans Torv with no socks 4 hours ago :shifty: . Appropriate way to end the binge, now I just want to find out who took the time to take off my shoes, remove my socks and put my shoes back on while I was sleeping.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 366)