Link to home
Start Free TrialLog in
Avatar of asukai
asukai

asked on

== and .equals clone()

Can someone tell me precisely the difference between == and .equals(). Also, tell me what is clone() do.

Thanx
Avatar of jamoville
jamoville
Flag of Afghanistan image

For strings I believe == checks if the object is the same and .equals checks for the same value.

For instanse
String one = "value";
String two = "value";

if (one == "value")    // false

if (one.equals("value") // true
ASKER CERTIFIED SOLUTION
Avatar of Jim Cakalic
Jim Cakalic
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial