Equality of strings
I have two strings that I think are the same. One is in an array list and the other is in an array.
Heres what they look like:
String names = new String[l];
ArrayList<String> v = new ArrayList<String>();
If I print them out like:
System.out.print(v.get(l+1) + " " + names[i]);
they both show dave
but if i do
if(names[i] == v.get(l+1))
the if statement returns false, (this is in a for statement)
Anyone know why this could be happening?
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center