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?
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL